New answers tagged

0

I had a very similar issue an it is that you aren't setting up your button as an INPUT_PULLUP. When you press the button, you are sending 5V or ground through it depending on your circuit. But then it won't reset on release. That is why either you can put a physical resistor as the schematic shows here: or you can simply change the button initialization to ...


-5

I believe you are getting lots of readings when the button is pushed but nothing when released. This link should solve your problem.


2

I think it's because you are using a pullup resistor, so it's constantly HIGH instead of constantly LOW. Try changing HIGH and LOW to the opposite.


2

There needs to be a delay() after the button state is read to allow time for it to return LOW, dumba**. You already have enough delay() in your textN() functions, just check the button state after calling that function, not before. Code should be as follows: void loop() { question1(); } void question1() { if (q1 == false) { text1(); } ...


0

Beautiful work with the 3D-printed guitar! You have already spent a lot of time and effort with the physical design and construction of the controller, so I recommend you plan on spending some quality time with basic Arduino programming, including the basic pin layout for the Pro Micro and the basics of programming in the Arduino language (basically C++) ...


0

It seems pins 11, 12 and 13 do not exist as input pins and pins 0 and 1 are used for RX/TX which you don't want to use neither probably. So instead of using a for loop iterating over indices, you should create an array with pin numbers and use that instead, something like: Create globally: int input_pins = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, ... }; ...


1

BOUNCE 2 Basically, the mechanical part of buttons and switches vibrate slightly when closed or opened causing multiple undesired false states (similar to noise). This library filters out these undesired state changes. More about debouncing: John Errington's Experiments with an Arduino : Using digital inputs: Switch bounce and solutions to it Wikipedia ...


Top 50 recent answers are included