ScratchData LogoScratchData
Back to AlSweigart's profile

Programmable LED Board (Base)

ALAlSweigart•Created September 17, 2013
Programmable LED Board (Base)
18
20
1322 views
View on Scratch

Instructions

Shift-Click the Green Flag to enable Turbo Mode (it really helps). The buttons on the right side demonstrate various things you can do with the programmable LED board. The buttons on the bottom will set the color of all the LEDs. Clicking on an LED will toggle it.

Description

Learn to program games with this free online Scratch course: https://inventwithscratch.com/class Remix this! Your program should set the "Board Width" and "Board Height" variables, and then broadcast (and wait) the "Make LED Board" message. (The current location of the LED sprite will become the bottom-left corner of the LED board.) Then, have your program set the "LED Register" variable to an "x,y" value without quotes (such as 4,5) and then broadcast (and wait) one of the following messages: - LED On - LED Off - LED Toggle Always broadcast AND wait. 0,0 is the bottom-left LED. X increases going to the right and Y increases going up. If the "Board Width" was 14, then the LED X coordinates go from 0 to 13. To change the color of an LED, have your program set the "LED Register" variable to an "x,y,color" value without quotes (such as 4,5,Red) and then broadcast (and wait) the "LED Color" message. The color always has a capitalized first letter and the rest is lowercase. The valid color values are Red, Orange, Yellow, Green, Cyan, Blue, Purple, and Magenta. Broadcast "Delete LED Board" to erase the LED board. You can build your own real-world programmable LED board with "Blinky Grid" from AdaFruit: http://www.adafruit.com/blog/2011/11/08/new-product-blinky-grid-programmable-led-matrix-kit/

Project Details

Project ID12441549
CreatedSeptember 17, 2013
Last ModifiedDecember 6, 2016
SharedSeptember 17, 2013
Visibilityvisible
CommentsAllowed