Info | ||
---|---|---|
Expected completion time of this lab:
. |
Table of Contents |
---|
Enable the D0 GPIO
...
Fill in the following table to create the command to send to the mote to enable the digital_in/D0 GPIO:
field name | length | value | explanation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
control byte | 1 byte |
| N.A. | ||||||||
id byte | 1 byte |
| N.A. | ||||||||
command | 1 byte |
| PUT | ||||||||
channel | type | 1 byte |
| type: address | |||||||
length | 1 byte |
| length: 2 bytes | ||||||||
value | 2 bytes |
| value: digital_in/D0 | ||||||||
variable | ID | 1 byte |
| type: enable | |||||||
length | 1 byte |
| length: 1 byte | ||||||||
value | 1 byte |
| enabled |
Issue the command to your mote:
macAddress | your mote’s MAC address, e.g. |
---|---|
priority | Medium |
srcPort | 61625 |
dstPort | 61625 |
options | 0 |
data | <see above> |
Read the value of the D0 GPIO
...
Fill in the following table to create the command to send to the mote to read the current value on digital_in/D0 GPIO:
...
field name | length | value | explanation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
control byte | 1 byte |
| N.A. | ||||||||
id byte | 1 byte |
| N.A. | ||||||||
command | 1 byte |
| GET | ||||||||
channel | type | 1 byte |
| type: address | |||||||
length | 1 byte |
| length: 2 bytes | ||||||||
value | 2 bytes |
| value: digital_in/D0 |
Issue the command to your mote:
macAddress | your mote’s MAC address, e.g. |
---|---|
priority | Medium |
srcPort | 61625 |
dstPort | 61625 |
options | 0 |
data | <see above> |
- The mote will answer with the state of the pin itself.
Fill in the following table with the bytes you receive. Start by filling in the "values received" column by directly copy-pasting the bytes. Then, use the tools guide to fill in the "explanation" column.
Info | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
| |
|
| |
|
|
|
|
| |
|
| |
|
|
|
|
| |
| |
| | |
What is the state (value) of your pin?
Info icon false title Answer 17.8: Connect a jumper between the
DP2
andVSUPPLY
pins. Make sure you can read the value of digital_in/D0 to be high.Connect a jumper between the
DP2
andGND
pins. Make sure you can read the value of digital_in/D0 to be low.Warning NEVER CONNECT
VSUPPLY
ANDGND
TOGETHER!!