Go Down

Topic: HELP ! PROGRAMING FSR SENSOR. (Read 89 times) previous topic - next topic

marcodiasf

Hello, I'm currently doing a project but I need some help for the code. I'm using a ARDUINO UNO, with 3 FSR sensors and a RGB led, the plan is to atribute a value of force to a colour of the led.

EXAMPLE: fsr reads "low force" red lights shows up, fsr reads "medium" force led brights yellow, fsr achieve the oprimal force, led brights green.

(I need the sensors to work idependely, if possible with the monitor showing up witch sensor is being used and what level of force is used)


please help :)

thanks

DaveEvans

#1
Mar 22, 2019, 11:33 pm Last Edit: Mar 23, 2019, 06:17 pm by DaveEvans
Pseudo-code:

Code: [Select]
setup()
  setup stuff

loop()
  loop through all sensors
   read sensor
   print sensor number and value to monitor
   if low force then light red LED*
   else if high force then light green LED*
   else light yellow LED*

*and turn off any others that are on


Spend an hour or so reading here https://www.arduino.cc/reference/en/.

marcodiasf

thank you !! if only I knew how to program it would be easier.
I'll try to code it,  I'm a mechanical engeineer guy, its not easy  :smiley-confuse:

jremington

We recommend to start with the tutorials that come with the Arduino software development package. Learn to read a button, a voltage, pulse an LED, send data to the display, etc.

That way you learn the language and the special features of the Arduino, and avoid a lot of frustration.

Go Up