8

You're getting noise pickup on the input pin when the button is not pressed. You need a pulldown resistor, about 10k to ground, to quiet the noise when the switch is open. Or even easier, use the built-in pullup resistor in the Arduino, which is ~10K to +5v, wire your button to ground instead of +5v, and reverse the if tests to test for logic LOW instead of ...


7

increase is a global variable and will implicitly initialized with the value zero. Then you are reading the EEPROM data into the variable storagedata in setup(). And then in loop() you are increasing increase from zero to one and write that to EEPROM. This value then gets read back into storagedata. So now increase and storagedata have the same value: one. ...


5

The problem is that you fail to initialize increase during setup(). The variable is undefined when the code enters the loop() function, even regardless of whether this is the first boot or not. You should change storagedata to a local variable in loop() and use increase to keep the value (or vice versa).


4

This is just a rough, incomplete and untested code. void singleclick1() { startTimer = true; } // this only sets a flag void singleclick2() { runTimer = false;} // this only clears a flag void loop() { button1.tick(); button2.tick(); if startTimer { // this occurs once every click 1 mode = millis(); ...


3

I see that MCP4725 uses Wire library with the default clock of 100,000 kb/sec. At a rough estimation each call to MCP.writeDAC or MCP.getValue will be at least 32 bits long and you use three of them in each loop. This one: Serial.println(MCP.getValue()); if (MCP.getValue()>threshold) is redundant, you should store the value in a temporary variable ...


2

There's no flow control on the Uno and Nano serial and you are sending fast enough that bytes are being dropped, and there's no way your protocol or lack of one demarcates separate messages (separate numbers). This will become more clear if you write your numbers in hexadecimal: Dec Hex 61805 0xf16d 61937 0xf1f1 28013 0x6d6d 61937 0xf1f1 Adding a delay ...


2

There are quite a few issues with this program. The most obvious is the use of floating point calculations in interrupt context. Interrupts should be served as fast as possible, and floating point is really slow on the AVR. Some other issues: Interrupt flags should be cleared by writing a logic 1 to them, however silly it may sound. A couple if & ...


2

I work with the wokwi Arduino simulator It is faster It uses the latest Arduino IDE for compilation It almost runs in real-time. For example, your job of 15 seconds might get executed at about the 17th or 20th second. Please give it a try. here are some references Links: https://wokwi.com and https://wokwi.com/arduino/libraries


2

Sending data between Arduino and NodeMcu (Serial Communication) youtube link (in French): https://youtu.be/0TXmi9EgaCs


2

your code mentions pin 3 while you describe using pin 2. perhaps that has to do with your error. otherwise check the following things: do you use long cables or is it near strong magnetic or static objects. for your code since you only read if it is high, see if the button is connected to 5v and pin 2 or 3 whichever one you use you can try adding a ...


1

here is what you can do 1.) check if the switch is connected to defined input pin, arduino starts form pin 0 sometimes we can misread while connecting. 2.) check if serial monitor has same baud rate as define in program. 3.) check the voltages around switch using multimeter. 4.) still not getting the attach a pull down resistor. 5.) still not getting invert ...


1

If you want something simpler than the transistor version you can use the following as well, for the other options skip to the --here-- mark Oldstyle analog out. this works like a vacuum tube and while I use a LDR you can also use heat or a actual vacuum tube. You Will Need: A low resistance LDR or multiple in parallel. A cardboard box or other box to ...


1

I didn't find any help in any data-sheets I could find, either. So I'd suggest a simple experiment, sending increasingly large packets before the other side attempts to read anything, until some data goes missing. The packets don't even need to be very sophisticated if all you want to know is whether N_receieved == N_sent and for what maximum 'N'.


1

Just a word of advice about AGC in general. There is almost always an issue of attack (how fast the AGC reacts to a sudden increase in signal) and release (how fast it reacts to a decrease). In most AGC cases you will need to make compromises on these two settings to avoid poor behavior from the AGC... it's not a drop-in solution with pre-determined ...


1

The ESP8266 is (highly likely) dead. The overheating is the giveaway. Because you haven't mentioned it, please measure the 3.3V coming out of the Arduino with a multimeter. Unlikely to be the issue but it is easy to check. You will need to buy a new ESP8266 and connect it up and give it a try with a fresh board. If all is good with the new board then the ...


1

This line of the receiver's code: Serial.println(r); is transmitting 7 bytes (5 digits, CR and LF). At 9600/8N1, each byte takes 1.04 ms, so the whole message is transmitted in 7.28 ms. In the meantime, the sender is sending 2-byte messages at full speed (no pause between the bytes). The receiver thus gets a new message every 2.08 ms. So, this receiver is ...


Only top voted, non community-wiki answers of a minimum length are eligible