- Mon Nov 10, 2014 11:12 pm
#176768
I reorganized the wiring and components a bit on the breadboard, and the strange voltage/ground problem went away. It's kind of like when you can't find your car keys, maybe it's time to start cleaning up the joint. I suspect I had a ground loop somewhere non-obvious.
Here's a bit of video showing infrared and Bluetooth communications working.
http://youtu.be/fZSd1P348A8
I have run into a few interesting problems. One issue was related to serial communication with the Arduino. Since the lighting code is so timing sensitive, it disables interrupts while it's writing data to the LED strip. This is problematic as it means your serial data will be dropped on the floor if you send any while the Arduino is writing to the LEDs.
I tried a few methods to get around this. I settled on having the Netduino set a digital output to high, which signaled the Arduino to stop refreshing the LEDs. Due to timing issues, I have to wait a little bit after I set the output high, write out the data, then wait a few milliseconds before signaling that it's OK to start refreshing the LEDs.
A better solution would be to have the Arduino handshake with the Netduino when it was ready to receive data. I don't want to use up too many pins, so I'm OK with a few wasted milliseconds.
The disabling of interrupts also made uploading new code to the Arduino touch-and-go. I typically had to cycle the power to the Arduino in order to get a new sketch uploaded.
I also got a voltage divider and the IMU prototyped in. I'm planning on using the voltage divider to warn me when the batteries get low. I borrowed all my IMU code from the first skateboard, and seem to be calculating a pretty good approximation of pitch angle.
Here's a bit of video showing infrared and Bluetooth communications working.
http://youtu.be/fZSd1P348A8
I have run into a few interesting problems. One issue was related to serial communication with the Arduino. Since the lighting code is so timing sensitive, it disables interrupts while it's writing data to the LED strip. This is problematic as it means your serial data will be dropped on the floor if you send any while the Arduino is writing to the LEDs.
I tried a few methods to get around this. I settled on having the Netduino set a digital output to high, which signaled the Arduino to stop refreshing the LEDs. Due to timing issues, I have to wait a little bit after I set the output high, write out the data, then wait a few milliseconds before signaling that it's OK to start refreshing the LEDs.
A better solution would be to have the Arduino handshake with the Netduino when it was ready to receive data. I don't want to use up too many pins, so I'm OK with a few wasted milliseconds.
The disabling of interrupts also made uploading new code to the Arduino touch-and-go. I typically had to cycle the power to the Arduino in order to get a new sketch uploaded.
I also got a voltage divider and the IMU prototyped in. I'm planning on using the voltage divider to warn me when the batteries get low. I borrowed all my IMU code from the first skateboard, and seem to be calculating a pretty good approximation of pitch angle.