Hi!
If i connect an RGB led to pins 12, 11 and 10 and access them directly from the Arduino code, the led behaves normally.
However, if i try to control the led with that same setup but from Johnny-Five instead, the red lead does not respond at all, and it doesn't even light up. If i change the setup to all-PWM pins, it works fine.
What is the reason for that? It doesn't affect my project at all, but i'm curious to know the reason.
Thank you!
PS: I'm not sure if this is the correct board for this question. I apologize if it isn't, but it seemed like a right choice.
jorgeguberte:
Hi!
If i connect an RGB led to pins 12, 11 and 10 and access them directly from the Arduino code, the led behaves normally.
However, if i try to control the led with that same setup but from Johnny-Five instead, the red lead does not respond at all, and it doesn't even light up. If i change the setup to all-PWM pins, it works fine.
What is the reason for that? It doesn't affect my project at all, but i'm curious to know the reason.
Thank you!
PS: I'm not sure if this is the correct board for this question. I apologize if it isn't, but it seemed like a right choice.
septillion:
But the fact it works on a PWM pins makes me suspect he uses PWM aka dimming to control the LEDs
Yep. 12 is not a PWM pin, and likely that's to what the red bit was connected, so likely Johnny-Five does some PWM stuff with all three colours. Shuffle everything down one pin, and voila! ;D
Would have been nice to have a link to this 'Johnny Five' stuff:
Seems to just be some javascript framework to communicate with a MQTT broker (PubNub: Publish/Subscribe server)
already have your answers..
on a side note:..
setting up a Raspberry Pi 3 as webserver -AND- MQTT broker costs only $35.00 and roughly 15 minutes of time!
very rewarding as well... and you have complete control over everything.
I set mine up using LAMP and Mosquitto Broker... which I found a simple PHP class to communicate directly to the MQTT server as well... so I can log to my MySQL database and publish to the broker all in one event/action.