Hello, Arduino community,
I am a student trying to make two thin-film pressure sensors turn on 4 separate green LEDs and one LED ring (a WS2812 ring to be exact). The code works so when one is pressed it should turn on 2 LEDs and the ring to half brightness. When both are pressed at the same time it should turn on two.
Currently, when uploaded when I apply pressure to the Arduino it reads at 0 and does not turn anything on. I have attached my code and a diagram to this post and any help would be lifesaving. (ps the resistors for the orange wiring are positioned on the right side of the breadboard-in tinkercad it wouldn't let me position it there).
Don't connect a real Arduino like that. There are so many mistakes that I lost count. The worst mistake is that you have shorted the 5V and GND pins which will cause the Arduino to reset and could damage your pc/laptop or if you are lucky, only cause the pc/laptop to give an error message and cut usb power to the arduino.
Your Force Sensitive Resistors (FSR) are not wired right (as far as I can tell). They need to be part of a voltage divider with the middle of the divider going to the analog input.
I often use the internal pullup for the FSR load resistor if the application permits.
Hello tomhadley
Run some tutorials to the hardware selected.
If you are happy with the results of the tutorials you can merge these to your project.
Have a nice day and enjoy coding in C++.
Дайте миру шанс!
I'm trying to make a code for a product that when charged turns on led lights at the top to mimick UV lighting. The sensors go on top of a standard power board and are turned on when someone charges a device.
Tom, nice diagram but I still don't get what's going on in your project. I see what looks like a growing plant, but don't understand what the force sensors are for or what is being charged.
I can say that with 24 RGB LEDs, the Arduino cannot provide enough power to light your ring, you will need a separate 5V power supply with maybe 2A current. This would be capable of powering the Arduino as well as the led ring.
Let's see an updated wiring diagram, maybe you have not corrected all the errors yet. Even better would be a schematic. Hand drawn on paper would be fine.
Looking back at your original diagram, I think I see what the general problem is. You think the breadboard holes are connected together in horizontal rows? It's the vertical columns that are connected together. The horizontal channel in the middle of the breadboard is where there is a break in those connections, the columns in the top half of the breadboard are not connected to the bottom half.
Some breadboards have some horizontally connected rows at the top and bottom, like the red and blue in this picture. But in the main part of the breadboard, the connections are vertical, shown in black above. Your breadboard doesn't have those horizontal rows, assuming it looks like the one in your wiring diagram.