This project is a tutorial which can teach you how to use the Grove - UART interface as a Digital I/O, and there’s also a blink demo. By the time you’re done with the tutorial you can use many other Grove modules such as Grove - LED, Grove - Button, Grove - Buzzer and so on.
First, connect your BBG to yout PC, input http://192.168.7.2:3000/ide.html in your browser and you’ll open the Cloud9 IDE.
Then create a new Terminal.
Input the following command.
Then blocking “cape_enable=capemgr.enable_partno=BB-UART2” just as the picture below shows.
Save and Exit the Vi editor. At last, reboot your BBG.
Connet the Grove - LED to BBG Grove - UART port through the Grove cable, as shown in the figure below.
Then Copy the following code to your Cloud9 IDE.
Now you’ll find the Grove - LED is blinking.
The Grove - UART interface can also be used as a PWM port, next time I’ll show you how to do it.