Insert one of the connectors on the end of the Grove cable into the Blue LED button. (Use either connector -- they are the same)
Insert the other connector to the "DIGITAL1" Grove jack on the NyBoard. See the "star" on the photo ->
Wiring:
Black: GND
Red: +5V (power)
White: D9 (LED output)
Yellow: D8 (button input)
Every time you create a new Mind+ program for the Bittle, you need to add the Petoi extension:
Project ... New
On the upper right, click "Python"
On the lower left, click the Extensions icon, then click "User-Ext"
Click the Petoi Coding Blocks extension to add it to your current Mind+ program
Click "Back"
You should now see a "User Expansion" icon on the lower left menu.
And run it...
Note that "Digital read" returns 1 when the button is not pressed, and 0 and when is pressed.
If that seems backwards to you, that's OK!
Press the "Code Area" button in Mind+ to see the output from the Print block.
Modify the program to do something different, such as:
blink the LED 5 times when you press the button
blink the LED 2 times when you release the button
Use the "Perform skill" block to move the pose the robot when you press the button and return to the "rest" post
after some time delay.
Use the Blue LED instead of (or in addition to) the NyBoard LED. It connected to output D8.
your ideas?
Be sure to save your program!