-
Notifications
You must be signed in to change notification settings - Fork 9
Troubleshooting and additional resources
Rachel Simone Weil edited this page Jan 11, 2017
·
9 revisions
- Refer to Adafruit's Feather HUZZAH guide, which includes pinouts and information about which pins should be high/low at power on.
- Unplug the Feather from other electronics if you need reflash it.
- If your device is not showing up in the Arduino IDE (in Tools > Ports), check the following:
- You installed the USB driver for your OS (and, if you're on a Mac, you read the note for Mac users on the Prerequisites page).
- Your USB cable and port are able to transmit data (not just for power). Try different cables and ports if this is a concern.
- Note that the Adafruit Feather HUZZAH and Adafruit HUZZAH are different boards. If you're looking for information online, be sure you're reading about the Feather HUZZAH.
- If your board resets on its own, check the link above. Some pins do double duty and require a certain state (high/low) on power on.
- If you get the following message while trying to upload your sketch in the Arduino IDE, go to Tools > Ports and select the correct COM port. If no devices are showing here, see #2 above.
An error occurred while uploading the sketch
error: espcomm_open failed
error: espcomm_upload_mem failed
- If one or both motors does the opposite of what's expected (left instead of right, backward instead of forward), swap which loop on the motor it's attached to.
- If one or both motors is unresponsive, check wiring and motors.
- Confirm screw terminals are closely tightly with wire firmly inside.
- Check pins on board--sometimes it can be difficult to read the labels and which pin they go to.
- Confirm that the ends of the wires connected to the motors have not slipped off their loops and are not touching other metal.
- Confirm that the VCC and GND pins on the H-bridge connect to the power and ground of an external battery (not the battery powering the Feather, but a separate battery such as AA battery pack). The motor battery and Feather's battery should share a common ground. The H-bridge will likely have a red power light.
- If after troubleshooting, you believe a motor is bad, swap it with another motor. (We have extras.)
- Refer to the photos folder in the feather-nodebot respository.
- If you have never used node/npm before, you might have difficulty discerning when an action is complete or if there is an error.
npm install
commands typically show lots of text during the progress of installation end with a display of a text-based folder tree. You may seenpm WARN
messages: these are usually not errors but just notices.npm ERR
indicates an error. - Depending on your operating system/terminal program, you may have difficulty with copying and pasting commands.
- Some programs do not allow paste via Ctrl-V; look up a reference if you aren't sure.
- Some programs have difficulty with code copied and pasted from formatted text such as the text on this Wiki. You may not see the formatting but the command will not work correctly. If a command isn't running as it should, try pasting the code into Notepad or a code editor that strips formatting, then copying the code from the code editor into the command line.
- Be sure you have moved into the directory containing your code (ex:
cd feather-nodebots
) before runningnode index.js
.
- If you receive an error while trying to connect that says something about events.js and that "you may need to reflash your board" you are likely receiving a timeout error. In index.js line 19, change the timeout time from 30000 to 50000 or 60000.
- Confirm that your laptop is connected to the same SSID you specified in the StandardFirmataWifi/wifiConfig code.
- Confirm that the board is plugged in via the microUSB slot (for USB power bank) or JST connector (for LiPoly batteries). Board should have a red and blue light on.
- Confirm that IP address in index.js is the same as IP address you received from the Arduino IDE serial monitor. While you should retain your IP address during normal disconnection and reconnection, there is a chance your IP address may have been reassigned. In this case, you can reconnect the board to your laptop over USB, open the serial monitor and view the IP address. If it does not appear, press the reset button on the board.
- Confirm that the Arduino IDE serial monitor is not still running.
- Johnny-Five assumes a PWM resolution of 0-256; however, the Feather HUZZAH has a higher default PWM resolution. PWM functions may not work without some modification to the Johnny-Five library or StandardFirmataWifi. This is why the motor reverse (
wheel.rev
) and adjustable speed are not in the sample sketch. - When working with analog pins, set the analog reference (
AREF
) to 1. See more information here in the section labeled "Step 3." - Refer to the Johnny-Five documentation.
- In the registration step, be sure you edited the device name and the access key before running the command. Your device name should be unique and contain only numbers and letters.
- If you get AMQP client connection errors while driving your robot, confirm that your device ID and device key in index.js are correct and appear with quote marks around them (e.g.,
"20948jffioeos+FEjs9...9gQ="
). - If your bot isn't showing up on the RoboWriter dashboard but you have successfully completed the registration steps and are receiving "Client connected" feedback in command line when you drive your bot, you might have removed or not included the Azure code provided in the sample. The data is sending properly when you see a JSON string with motion commands such as "rt(14.29984)" appear as you drive the car.
- If your bot is appearing on the RoboWriter dashboard but its motion is inaccurate, keep in mind:
- Turning around in a circle is considered a pivot on a single point, so if you only turn left and right without moving the car forward, you will not see forward motion represented.
- OK, nerdy explanation: The tracker does not truly measure distance traveled as claimed (!!!) because rotary encoders or other distance-sensing mechanisms are not part of the basic kit. It instead extrapolates distance traveled based on time elapsed between sending commands to the bot and does math based on MANY assumptions about your bot's weight, the surface it's traveling on, the speed at which the wheels rotate, etc. This could be made much more accurate with additional hardware, and in that case it would be really cool!
- During large workshops, WiFi is really heavily taxed, and it's possible that a command didn't make it through to Azure. It would be better to have a sophisticated queueing system if this were the real world. Fortunately, it's not the real world; it's CodeMash. :)