Products PayPal provides a safe and secure way to purchase online. We never see your credit card number or store it on our server. You can use your PayPal account or major credit card to process your order online safely. Featured Project This project walks through the steps we followed to get the AI framework PyTorch to run on a Raspberry Pi 4 |
![]() |
Turn on an LED with Watson Conversation
1.) You will need to have node already installed on your Pi. You may find NPM's rpio-gpio site helpful for syntax.
2.) Run the command npm install rpi-gpio in terminal.
3.) We started with the conversation.js file from Watson's TJBot example, and added the following lines before we instantiated our bot.
The first parameter for setup() is the channel. Make sure to reference the RPi pin number and not the GPIO. The second parameter is the direction, DIR_OUT writes to pin #7. You can also change the name of your bot to something different. We picked "Bob" as it was less likely to be confused with other words.
4.) After the utterances part of the code add the following code for speech recognition.
// turns off light if (containsLight && containsOff ) { 5.) Setup for the pins.
6.) The complete node js code. |
![]() |
|