rwaldron / galileo-io

Intel Galileo & Intel Edison IO Plugin for Johnny-Five
http://johnny-five.io
MIT License
101 stars 26 forks source link

analogWrite giving strange values #8

Closed cyamada closed 10 years ago

cyamada commented 10 years ago

I had trouble using analogWrite to drive an RGB LED. I created a basic color cycle script that is supposed to cycle through colors (based off the adafruit example) however, the LED appears to default to a green/blue color or sometimes random combination. I've also tried iteratively changing each analogWrite value in an attempt to reproduce a single color but have been unable to do so. The setup works fine when using an Arduino UNO and the Arduino side of the Galileo, and only fails when using the io script. I noticed that even when pins were written to 0 voltages of approximately 2.7V could be read on the output pins. Complete code can be found here.

rwaldron commented 10 years ago

Is your Led common anode?

cyamada commented 10 years ago

The LED is common anode. I realized that the code posted on the intel forum only had two colors, the full code had the same colors demonstrated in the adafruit example. I also do not have access to my board at present but will report back after trying the updated code.

rwaldron commented 10 years ago

https://communities.intel.com/message/236355#236355