Johnny Five, RGB Led and non-PWM pins

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.

Right board, not enough info. Schematic, please.

No idea who Johnny-Five is... Let alone what his code looks like.

But the fact it works on a PWM pins makes me suspect he uses PWM aka dimming to control the LEDs :)

Now my curiosity is piqued:

septillion: No idea who Johnny-Five is... Let alone what his code looks like.

Here "he" is: https://create.arduino.cc/projecthub/pubnub/getting-started-with-johnny-five-for-iot-part-1-3f3607

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

Cheers! Dirk

Would have been nice to have a link to this 'Johnny Five' stuff:

http://johnny-five.io/

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.

My advice is not to use johnny-five. Clearly the clowns running it don't have the most basic understanding of electronics: |500x333 |491x500 It makes me very sad to see beginners taught such completely wrong things. It's almost like they want people to destroy their Arduinos.

pert: Clearly the clowns running it don't have the most basic understanding of electronics:

Nor how to configure the server to us an SSL certificate. Which is beyond pathetic given the fact they are using AWS.