Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit f14de271 authored by Mark Yoder's avatar Mark Yoder Committed by Robert Nelson
Browse files

Switched 1. to <1>

parent b0e5ed79
Branches
Tags
No related merge requests found
......@@ -361,18 +361,19 @@ LED matrix display (matrixLEDi2c.py)
:download:`matrixLEDi2c.py <../code/03displays/matrixLEDi2c.py>`
.. annotations::
1. This line states which bus to use. The last digit gives the |I2C| bus number.
<1> This line states which bus to use. The last digit gives the |I2C| bus number.
2. This specifies the address of the LED matrix, *0x70* in our case.
<2> This specifies the address of the LED matrix, *0x70* in our case.
3. This indicates which LEDs to turn on. The first byte is for the first column of ``green`` LEDs. In this case, all are turned off. The next byte is for the first column of ``red`` LEDs. The hex *0x3c* number is *0b00111100* in binary. This means the first two red LEDs are off, the next four are on, and the last two are off. The next byte (*0x00*) says the second column of *green* LEDs are all off, the fourth byte (*0x42* = *0b01000010*) says just two *red* LEDs are on, and so on. Declarations define four different patterns to display on the LED matrix, the last being all turned off.
<3> This indicates which LEDs to turn on. The first byte is for the first column of ``green`` LEDs. In this case, all are turned off. The next byte is for the first column of ``red`` LEDs. The hex *0x3c* number is *0b00111100* in binary. This means the first two red LEDs are off, the next four are on, and the last two are off. The next byte (*0x00*) says the second column of *green* LEDs are all off, the fourth byte (*0x42* = *0b01000010*) says just two *red* LEDs are on, and so on. Declarations define four different patterns to display on the LED matrix, the last being all turned off.
4. Send three commands to the matrix to get it ready to display.
<4> Send three commands to the matrix to get it ready to display.
5. Now, we are ready to display the various patterns. After each pattern is displayed, we sleep a certain amount of time so that the pattern can be seen.
<5> Now, we are ready to display the various patterns. After each pattern is displayed, we sleep a certain amount of time so that the pattern can be seen.
6. Finally, send commands to the LED matrix to set the brightness. This makes the display fade out and back in again.
<6> Finally, send commands to the LED matrix to set the brightness. This makes the display fade out and back in again.
.. _displays_drive5V:
......
......@@ -1049,17 +1049,19 @@ to a file called ``launchPad.ino`` and run it on your LaunchPad.
:download:`launchPad.ino <../code/06iot/launchPad/launchPad.ino>`
1. Set the mode for the built-in red and green LEDs.
.. annotations::
2. Start the serial port at 9600 baud.
<1> Set the mode for the built-in red and green LEDs.
3. Prompt the user, which in this case is the Bone.
<2> Start the serial port at 9600 baud.
4. Set the LEDs to the current values of the *red* and *green* variables.
<3> Prompt the user, which in this case is the Bone.
5. Wait for characters to arrive on the serial port.
<4> Set the LEDs to the current values of the *red* and *green* variables.
6. After the characters are received, read it and respond to it.
<5> Wait for characters to arrive on the serial port.
<6> After the characters are received, read it and respond to it.
On the Bone, add the script in :ref:`js_launchPadBeagle_code` to a file called `launchPad.js` and run it.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment