Pages: [1]   Go Down
Author Topic: RGB LED with pressure sensor.  (Read 879 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 42
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, I want to control the colour with the pressure sensor but not to sure what code I should use?

The RGB I have is a Pirhana RGB, 4 pin.

If anyone has any idea of the code, that would be great 

Many thanks
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 50115
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If anyone has any idea of the code, that would be great
analogRead() to read the pressure sensor and analogWrite() to set the RGB color values.

What color should 4 pounds be? How about 197?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 50115
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Im new with the arduino coding, not to sure what you mean by 4 pounds ?
You have a pressure sensor. When you apply 4 pounds of pressure, what color should the LED be?

There's a lot more to application development that just writing the code. Defining requirements, for one thing.
Logged

Pages: [1]   Go Up
Jump to: