text:
Uploading sketch to ATTiny84 with Nano as "Arduinio as ISP" stopped working
Update 12/11
Working through the answer posted.

Upload reset appearance - [Works blinks correctly.]
Convince yourself that reset appearance code reliable indicates DTR resets. [Opened the serial monitor 5-6 times, nothing changed or blinked]
10uF cap between Arduino Nano RESET and adjacent GND. [Done]
Plug the board back in and you should see the LED Blink rapidly for the power-on (not DTR) reset. [Blinks rapidly same as after upload of sketch in Step one]
Open (or Reopen) the serial monitor and see that the LED remains OFF. [No LED's]
Break the RESET leg of whatever circuit you chose for defeating DTR reset. Upload the ArduinoISP sketch [Uploaded and verified, no problem]
You should see a signature check error like this: [Yes this error occured same message as you posted]
Upload Empty sketch [ IT WORKS !!!!!]
Check using one of my previous sketchs [WOOT! It works]

Thanks, that resolved the issue!! (although I've aready bought a universal programmer because I didn't think I would ever get it working).
Update - 11/Nov
As suggested, I have taken the nano out of any board and it is dangling from the USB cable. I have tried to upload the default sketch.
void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

using the settings:

Board Attiny22/44/84
Processor Attiny84
Programmer Arduino as ISP

I still get the problem of programmer not responding. Did this for all 3 nanos I have available.
===
Update - 11/nov
I have now wiped all the IDE from my machine and reloaded. I have attempted to program an ATmega168PA instead of the tiny. Same problem.
Update - 10/nov:
After swapping between 2 different nanos and different capacitors to check that the cap is working. I noticed some different behavour. Nano A fails as below, however Nano B fails, but the message is slightly different. Instead of resp=0x00 I have resp=0xFF
Also on Nano B the L light doesn't flash it is on constantly and the 10 getsync messages go really fast.

I really could do with a solution if anyone has one.
I am trying to upload a sketch into a ATTiny84 with Nano as "Arduinio as ISP". This worked last week, same sketch, no changes. I have attempted to troubleshoot:
Changed ATTiny chips, changed between 3 different Nanos (and even bought another which also failed), I have changed all the USB cables, changed all the wires. I have installed the IDE on different machines.
In summary, I have tried:

3 different machines: Linux, Raspberry Pi, Windows 10
7 different ATTiny84 chips (I have ten, but don't want to use the other 3 in case this is bricking them!)
4 different Nanos
different USB cables, different wires, replaced the capacitors

I have triple checked the configuration. Nothing seems to fix the problem.
I have no issue with any of the Nanos, I can use them directly, but just can't seem to use them to push into the AVR. It worked with the same configuration for weeks, now it doesn't. I'm really scratching my head.
I'm using:

ATTiny core by David A. Mellis
Boards: Attiny24/44/84
Processor: Attiny84
Clock: Internal 1 Mhz
Programmer: Arduinio as ISP
"Upload using Programmer"

Verbose Error messages:
Arduino: 1.8.13 (Linux), Board: "ATtiny24/44/84, ATtiny84, Internal 1 MHz"

/home/rick/arduino-1.8.13/arduino-builder -dump-prefs -logger=machine -hardware /home/rick/arduino-1.8.13/hardware -hardware /home/rick/.arduino15/packages -hardware /home/rick/Arduino/hardware -tools /home/rick/arduino-1.8.13/tools-builder -tools /home/rick/arduino-1.8.13/hardware/tools/avr -tools /home/rick/.arduino15/packages -built-in-libraries /home/rick/arduino-1.8.13/libraries -libraries /home/rick/Arduino/libraries -fqbn=attiny:avr:ATtinyX4:cpu=attiny84,clock=internal1 -vid-pid=1A86_7523 -ide-version=10813 -build-path /tmp/arduino_build_476590 -warnings=default -build-cache /tmp/arduino_cache_440110 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/home/rick/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/rick/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/rick/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/rick/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.avr-gcc.path=/home/rick/arduino-1.8.13/hardware/tools/avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/rick/arduino-1.8.13/hardware/tools/avr -verbose /home/rick/Arduino/Light_detector_Example/Light_detector_Example.ino
/home/rick/arduino-1.8.13/arduino-builder -compile -logger=machine -hardware /home/rick/arduino-1.8.13/hardware -hardware /home/rick/.arduino15/packages -hardware /home/rick/Arduino/hardware -tools /home/rick/arduino-1.8.13/tools-builder -tools /home/rick/arduino-1.8.13/hardware/tools/avr -tools /home/rick/.arduino15/packages -built-in-libraries /home/rick/arduino-1.8.13/libraries -libraries /home/rick/Arduino/libraries -fqbn=attiny:avr:ATtinyX4:cpu=attiny84,clock=internal1 -vid-pid=1A86_7523 -ide-version=10813 -build-path /tmp/arduino_build_476590 -warnings=default -build-cache /tmp/arduino_cache_440110 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/home/rick/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/rick/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/rick/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/rick/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.avr-gcc.path=/home/rick/arduino-1.8.13/hardware/tools/avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/rick/arduino-1.8.13/hardware/tools/avr -verbose /home/rick/Arduino/Light_detector_Example/Light_detector_Example.ino
Using board 'ATtinyX4' from platform in folder: /home/rick/.arduino15/packages/attiny/hardware/avr/1.0.2
Using core 'arduino' from platform in folder: /home/rick/arduino-1.8.13/hardware/arduino/avr
Detecting libraries used...
/home/rick/arduino-1.8.13/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny84 -DF_CPU=1000000L -DARDUINO=10813 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I/home/rick/arduino-1.8.13/hardware/arduino/avr/cores/arduino -I/home/rick/.arduino15/packages/attiny/hardware/avr/1.0.2/variants/tiny14 /tmp/arduino_build_476590/sketch/Light_detector_Example.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for SendOnlySoftwareSerial.h: [SendOnlySoftwareSerial]
ResolveLibrary(SendOnlySoftwareSerial.h)
  -> candidates: [SendOnlySoftwareSerial]
/home/rick/arduino-1.8.13/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny84 -DF_CPU=1000000L -DARDUINO=10813 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I/home/rick/arduino-1.8.13/hardware/arduino/avr/cores/arduino -I/home/rick/.arduino15/packages/attiny/hardware/avr/1.0.2/variants/tiny14 -I/home/rick/Arduino/libraries/SendOnlySoftwareSerial /tmp/arduino_build_476590/sketch/Light_detector_Example.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Using cached library dependencies for file: /home/rick/Arduino/libraries/SendOnlySoftwareSerial/SendOnlySoftwareSerial.cpp
Generating function prototypes...
/home/rick/arduino-1.8.13/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny84 -DF_CPU=1000000L -DARDUINO=10813 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I/home/rick/arduino-1.8.13/hardware/arduino/avr/cores/arduino -I/home/rick/.arduino15/packages/attiny/hardware/avr/1.0.2/variants/tiny14 -I/home/rick/Arduino/libraries/SendOnlySoftwareSerial /tmp/arduino_build_476590/sketch/Light_detector_Example.ino.cpp -o /tmp/arduino_build_476590/preproc/ctags_target_for_gcc_minus_e.cpp -DARDUINO_LIB_DISCOVERY_PHASE
/home/rick/arduino-1.8.13/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_476590/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/rick/arduino-1.8.13/hardware/tools/avr/bin/avr-g++ -c -g -Os -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=attiny84 -DF_CPU=1000000L -DARDUINO=10813 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I/home/rick/arduino-1.8.13/hardware/arduino/avr/cores/arduino -I/home/rick/.arduino15/packages/attiny/hardware/avr/1.0.2/variants/tiny14 -I/home/rick/Arduino/libraries/SendOnlySoftwareSerial /tmp/arduino_build_476590/sketch/Light_detector_Example.ino.cpp -o /tmp/arduino_build_476590/sketch/Light_detector_Example.ino.cpp.o
Compiling libraries...
Compiling library "SendOnlySoftwareSerial"
Using previously compiled file: /tmp/arduino_build_476590/libraries/SendOnlySoftwareSerial/SendOnlySoftwareSerial.cpp.o
Compiling core...
Using precompiled core: /tmp/arduino_cache_440110/core/core_attiny_avr_ATtinyX4_cpu_attiny84,clock_internal1_8328ca5f502560caf6997d9e8039b097.a
Linking everything together...
/home/rick/arduino-1.8.13/hardware/tools/avr/bin/avr-gcc -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=attiny84 -o /tmp/arduino_build_476590/Light_detector_Example.ino.elf /tmp/arduino_build_476590/sketch/Light_detector_Example.ino.cpp.o /tmp/arduino_build_476590/libraries/SendOnlySoftwareSerial/SendOnlySoftwareSerial.cpp.o /tmp/arduino_build_476590/../arduino_cache_440110/core/core_attiny_avr_ATtinyX4_cpu_attiny84,clock_internal1_8328ca5f502560caf6997d9e8039b097.a -L/tmp/arduino_build_476590 -lm
/home/rick/arduino-1.8.13/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino_build_476590/Light_detector_Example.ino.elf /tmp/arduino_build_476590/Light_detector_Example.ino.eep
/home/rick/arduino-1.8.13/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /tmp/arduino_build_476590/Light_detector_Example.ino.elf /tmp/arduino_build_476590/Light_detector_Example.ino.hex
Using library SendOnlySoftwareSerial in folder: /home/rick/Arduino/libraries/SendOnlySoftwareSerial (legacy)
/home/rick/arduino-1.8.13/hardware/tools/avr/bin/avr-size -A /tmp/arduino_build_476590/Light_detector_Example.ino.elf
Sketch uses 1666 bytes (20%) of program storage space. Maximum is 8192 bytes.
Global variables use 152 bytes (29%) of dynamic memory, leaving 360 bytes for local variables. Maximum is 512 bytes.
/home/rick/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/rick/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -pattiny84 -cstk500v1 -P/dev/ttyUSB0 -b19200 -Uflash:w:/tmp/arduino_build_476590/Light_detector_Example.ino.hex:i

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/rick/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/rick/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

VCC & GND connected
White wire (Pin 9) -> D13
Yellow wire 1 (Pin 8) -> D12
Red wire (Pin 7) -> D11
Yellow wire 2 (Pin 4) -> D10
10 Capacitor between RST & Gnd

The only change I can remember making was adding a library for SerialOutOnly. But I did a clean install on the Windows and Rasberry with only the ATTiny libraries and it still does the same time.
People missed my comment, so I've uploaded a second photo of the entire breadboard. It is powered there are two wires which were out of frame in the first photo.

Yes, the ATtiny is on a breadboad. I used https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json this link to setup the Attiny boards. Then I am using Attiny24/44/84, Processor Attiny84, and internal 1 Mhz clock.

Yes, I have a capacitor between gnd & reset.

I edited the question for a better title and tags. The avrdude output doesn't look to be verbose. did you turn on in Preferences verbose mode for upload?

Yes, for both compilation and upload.

That sounds really frustrating. But if it worked before, something must have changed to make it not work now (sorry, that’s obvious). You’ve as good as ruled out the PC side of things by testing it with different setups. Did you make sure all Nanos have the “ArduinoISP” sketch loaded and the ATtiny fuses match the expected setup? Could you add a picture of your setup?

From your picture, I think your ATtiny84 is not powered (connected to the wrong power rails). The positive (red) and negative (blue) rails on both sides of a breadboard are usually not connected .

At the top of the breadboard, outside the picture, there are two wires connecting the power and ground on both sides.

Having followed all of the suggestions and comments here, I'm not sure what to suggest you do now outside of producing a video showing every last thing you're doing throughout the entire process, including the part of putting the arduinoisp.ino sketch on the nano.  To be clear, the error messages themselves are in avrdude failing to talk to the arduinoisp.ino sketch.  You could, and perhaps should for a sanity check, pull the nano right off the board and see that you get an entirely different error message.  If you don't then there is something wrong with the arduinoisp.ino sketch loaded.

With arduinoisp.ino loaded correctly, with nothing wired to it at all, with the correct options specified during uploading, you would get a failure to check the device signature and not the sync error you are getting now.

You would still need to have reset defeated by cap no gnd, cut trace, or hard pullup, without the other wiring attached.  I have done this here using a 62 ohms pullup (instead of a cap) and it behaved as expected.  Which is to say it failed to check the device's (not attached) signature and NOT an stk500v1 protocol sync error.  I then went on to hook a t85 to it and that worked fine as well.  I /could/ write all this up, but I deeply suspect if I do that you're going to come back with "still not working" because of something going on there that we cannot see.

Well, I'm glad it works for you.  I'm unclear on what changed from what you were doing before to now though.

I think it might have been the "reupload" of the Arduinio as ISP ??

Heh, well, I guess we'll never know.  Generally speaking the arduinoisp.ino sketch itself is reliable.  The process for using it is not terribly clear for most people the first couple times through.

Differences in my environment
I don't have a normal Nano on a ATTiny84 on hand at this moment.
For our purposes, I'm using the ATTiny44, which is essentially what you have, only with smaller memories.  The Nano that I'm using is Nano Clone that I have retrofitted with a ATMega328PB rather than the regular 328P.  To make matters slightly more confusing it is running the regular UNO (rather than NANO) bootloader.  The bootloader lies about the chip signature (saying it is 328P) and uses the UNO baudrate 115200 rather than the Nano's 57600.  So you will see in my screenshots/examples and menu selections "UNO" rather than "Nano", "328PB" rather than "328P", and "ATTiny44" rather than "ATTiny84."
These differences are inconsequential.
Build trust in your RESET-defeating mechanism
Upload reset appearance code
Remove all external circuitry from your Nano.  All means ALL.  That includes
whatever you did to defeat reset as well.
Choose Arduino Nano from the Tools/Boards menu.
Choose your Arduino Nano's port from the Tools/Port menu.
Upload the following sketch:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  static bool led_state;
  static size_t toggle_counter;

  if (toggle_counter < 20LU * 6) {
    led_state = !led_state;
    digitalWrite(LED_BUILTIN, led_state);
    delay(50);
    ++toggle_counter;
  }
}

The LED should blink rapidly for 6 seconds and then remain off indefinitely.
The Nano's optiboot bootloader blinks the builtin pin 13 LED three times, but it is a very short event and maybe difficult to distinguish form SPI clock action (which also happens on pin 13).  By contrast, it's hard to miss the blinking that this code produces.
Convince yourself that reset appearance code reliable indicates DTR resets.
Open (or Reopen) the serial monitor and see that it does this again.  Close and
Reopen the serial monitor however many times you want until you feel
comfortable that you're seeing clear indication of the board having reset.
Install your DTR RESET-defeat circuitry for a test.
Unplug your board and install your choice of reset defeating circuitry.
The typical suggestion is a 10uF cap between Arduino Nano RESET and adjacent
GND.  Make sure you don't have your electrolytic cap backwards.
I frequently use a hard pullup of about 60 Ohms.
Plug the board back in and you should see the LED Blink rapidly for the
power-on (not DTR) reset.
Convince yourself that DTR reset has been defeated.
Open (or Reopen) the serial monitor and see that the LED remains OFF.
Reopen the serial monitor however many times and see that the LED stays OFF.
Upload the arduinoisp.ino sketch
NOTE: At time of writing the current IDE version is 1.8.13.  Though, everything
said here should be find for old and likely future IDE/arduinoisp.ino releases.
In the IDE, from menu File/Examples/11.ArduinoISP, choose the ArduinoISP
sketch.  In its current from in IDE 1.8.13 it requires no modifications for a factory-fresh ATTiny84(A) (or pretty much any AVR), that is with its default configuration fuse values.
Break the RESET leg of whatever circuit you chose for defeating DTR reset.
Upload the ArduinoISP sketch.
You should see that the LED does NOT blink rapidly for 6 seconds as it had previously.
This should indicate that you have successfully uploaded the arduinoisp.ino sketch.
Reconnect RESET leg of whatever circuit you chose for defeating DTR reset.
Attempt to program (without target chip attached) to see that you do not get SYNC errors.
Open a new empty sketch.
Choose your target chip's settings from the Boards menu.  That is your D.
Mellis ATTiny84 "board" should be selected.  Or more generally: any compatible "board" from any board support package that supports whatever AVR you want to do this with.
Verify that your Arduino Nano's port is still selected in Tools/Port menu.
From the Tools/Programmer select "Arduino as ISP".  Barring some internationalization effort, it should say exactly that. It should NOT say "ArduinoISP" or "ArduinoISP.org".  Yes, the Arduino people are usually BAD at picking names.
Choose "Upload using programmer".
You should see a signature check error like this:
avrdude: AVR device initialized and ready to accept instructions

An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x00ffff
avrdude: Expected signature for ATtiny44 is 1E 92 07
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

You may need to turn on "Verbose" for uploading in preferences.
Because you have not wired anything to the SPI pins the returned device
signature will be pure junk.  The important thing here is you got a device
signature failure and NOT a sync error.  A sync error represents failure of avrdude to talk to the arduinoisp.ino sketch's implementation of the STK500v1 programming protocol.  What you're seeing here is successful STK500v1 communication (to arduinoiso.ino) reporting a perfectly reasonable failure to identify the chip (that you have not even attached yet).
Wire your ATTiny84 (or whatever)
Unplug your Nano and wire AVR to it.  With the exception of your attempt to use VIN, I didn't notice anything wrong with your wiring.
The ATTiny84 should be wired as:
Nano 5V (not VIN) to ATTiny84 pin  1
Nano GND          to ATTiny84 pin 14
Nano PIN 13       to ATTiny84 pin  9
Nano PIN 12       to ATTiny84 pin  8
Nano PIN 11       to ATTiny84 pin  7
Nano PIN 10       to ATTiny84 pin  4

Or more broadly for any ISP supporting AVR tiny/mega:
Nano 5V (not VIN) to ALL AVR (A)VCCs.
Nano GND          to ALL AVR GNDs
Nano PIN 13       to AVR (U)SCK
Nano PIN 12       to AVR MISO
Nano PIN 11       to AVR MOSI
Nano PIN 10       to AVR RESET

You may want to add a pull-up resistor from the target AVR's RESET to its VCC.  This should be not needed for use with arduinoisp.ino sketch, but you might want it for running on the breadboard.  You may also want to add a decoupling cap between your AVR's VCCs and GND.  I've never needed this for just programming on solderless breadboard though.
I don't typically use breadboard power rails when programming AVR devices with single VCC an GND pins.
Generally keep your connection short in any case.  They should not be longer than 20 cm really, and can usually be less than half that. Keep them together with the GND where possible. Your SCK signal should probably receive the most care.  I don't see anything wrong with the length of your connections.
Upload
Plug your Nano (and AVR wired to it) back into USB.
Make sure you power light hasn't gone out on the Nano, that it doesn't drop off the USB bus, and nothing feels hot to the touch.  That nothing smells odd.
Choose whatever you want to upload.  An empty sketch is fine for testing uploading.
Verify that Tools/Port is the port of the Nano.
Verify that the programmer is still "Arduino as ISP".
Verify that the "board" is still whatever it should be for your target chip (not the Nano).
Choose "Upload using Programmer".
You should get a successful output, that would look something like:
/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -pattiny44 -cstk500v1 -P/dev/ttyUSB0 -b19200 -Uflash:w:/tmp/arduino_build_656744/sketch_nov12b.ino.hex:i

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/user/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/home/user/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATtiny44
         Chip Erase delay              : 4500 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     6     4    0 no        256    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      4096   64     64  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9207 (probably t44)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/tmp/arduino_build_656744/sketch_nov12b.ino.hex"
avrdude: writing flash (286 bytes):

Writing | ################################################## | 100% 0.46s

avrdude: 286 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_656744/sketch_nov12b.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_656744/sketch_nov12b.ino.hex:
avrdude: input file /tmp/arduino_build_656744/sketch_nov12b.ino.hex contains 286 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.22s

avrdude: verifying ...
avrdude: 286 bytes of flash verified

avrdude done.  Thank you.

The above was generated using the process described with my slightly different setup.
With everything being correct in the IDE, if you get SYNC error now you
probably have a wiring issue that's causing the Nano to fail, interfering with its ability to execute the stk500v1 implementation.  This was part of the thinking behind pointing out your VIN connection in the original post:

That gave me a brief glimmer of hope, but I've made that change and it hasn't worked. I've tried a couple of different AT84's and Nanos.

If you watch carefully do you see the L light blink in the way that it does during a reset?  In other words, is your RESET holdup-cap actually doing its job?

Yes the L light is blinking when I attempt to upload the sketch.

Yeah, it would as being SCK.  What I'm getting at is that it will blink three times on a reset.  If it's doing that particular thing when you're trying to upload, it means the cap is not keeping reset from going low.

I don't understand what you mean. I took the capacitor out and tried again. The blinking seems to be the same regardless if the Cap is in or out. I tried a different capacitor. Same result.

It would be subtle when you're running te arduinoisp.ino sketch.  It would be easier to test with a sketch that did nothing at all.  That way if you opened the serial monitor to it and you saw any blinking at all, you'd know it was resetting for sure.  Anyway, other than the VIN bit, your wiring looks fine for programming.  For what it's worth, I tend to use about 60 ohms between resistance between reset and 5v rather than a 10uF capacitor to ground, simply because I have a resistor substitution box I use all the time.

From your picture, it looks like your ATtiny84 is not powered (connected to unpowered power rails).
The positive (red) and negative (blue) rails on both sides of a breadboard are usually not connected. You should either manually connect the power rails on opposite sides of your breadboard or connect your ATtiny power pins (1 and 14) to the corresponding rail on the other side of your board. See below (apologies for the crude drawing).

The power wasn't showing in the first photo it was out-of-frame.


text:
TQFP Atmega328pu-th cant upload sketch sync error (breadboard)
So I have a USB to ftdi connected to my qtfp 32 socket trying to upload a sketch but I get a sync error , as far as I am aware I have uploaded the sketch correctly

sync error usually means upload was impossible. In your case, wiring is the first problem candidate, sorry.

Does your chip have a bootloader on it? How have you wired up your setup?

@majenko exactly like this picture Burn https://imgur.com/gallery/8xpHGqo

Which one? The first or second?

@Majenko sorry if I am using this wrong really new here. the second one with the red board (ftdi) I have everything wired like that but I get sync error. Also my chip has a weird suffix, -UTH

And did you first wire up like the first way and install the bootloader?

yep and it said boot loader burned successfully or something like that, I've checked everything so many times no idea what I am doing wrong

Check the crystal. Make sure it's as close to the chip as possible. If you are using a breadboard, try lower value capacitors, or no capacitors.

@gerben thank you will do

Hey guys I managed to figure it out I had to remove the dtr pin from pin 29 , I made a video to help anyone else looking to do it, I don't know if it breeches any self promotion? But hope it helps because i found it difficult to find any resources. https://youtu.be/5CPYz6Kde7M

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
ST7789 TFT display only shows a correct image while Arduino reset button is held down - Why?
I am trying to get the ST7789 TFT display to work with Arduino. I followed online guides  for connections and am using the fast library fron github and included workbench ino (https://github.com/cbm80amiga/Arduino_ST7789_Fast).
Problem: The program runs and drives the display but the image is corrupt and only partial. I discovered that if I quickly and firmly press the reset button - and keep it pressed down - the image at the moment of reset press suddenly becomes full and good (albeit static because reset is pressed). Ofcourse as soon as I release the reset button the program restarts with the same corrupt image (the pictures below illustrate the issue).

I could not find a description of this particular problem by online searching. Here is what I tried to fix it (all to no avail):

I confirmed all pins are correct as defined in the ino script.
I ensure only the 3.3v power line is used. I have never connected the Vcc to 5 v
I tried with a genuine Arduino UNO as well as a clone - both show the same behaviour.
I used 1k:2k resistor voltage dividers for the data lines, res and DC - these did not help. In fact the display did not work at all with the voltage dividers, only the backlight came on and the screen flickered slightly. I checked that I was getting ~3v in the middle of each divider.
I used two separate ST7789 display boards, bought from two separate sellers on different occasions - both show the same behaviour.

[Edits in response to comments below]

The same behviour occurs when using a sketch that uses the standard Adafruit libraries (as opposed to the fast library linked above).
The same corruption is seen when run on an arduino nano clone. However, with the nano, pressing the reset button shows only a fleeting glimpse of the full image prior to resetting (i.e. holding down the reset button does not preserve a static image on the screen).

Any ideas about what is going on and how to fix it? Thanks.

Maybe that "fast" library is just too fast? Have you tried the Adafruit ST7789 library? We know that one works properly.

Did your program constantly clear the screen (with fillScreen()) in a loop?

As different UNOs as well as different displays show the same behaviour, it's the software, most probably. Did you try what Majenko suggests?

Regarding fillscreen, no. In the besnchmark test shown fillscreen is used to clear the screen inbetween benchmark tests. The setup function ploughs through each test. At the end is prints the results to the screen and leaves it like that. The loop function is empty. So you are left with a static screen of results (shown in my pictures above). The corruption is constant throughout regardless of animation, clearing screen or static images. Only press-holding the rest make the image full and clear. Perhaps something to do with grounding / changing constant voltages somewhere caused by the reset?

I managed to load an example that uses the standard Adafruit libraries (not the fast libraries) - from here link. It 'works' but with the same problem described above - corrupt image until press-hold of reset then image becomes full and clear. So not a problem with the 'fast' library.

Just as I was about to dispose mine I stumble on your post. You saved me man! Thanks

I found the answer to this problem. After reading multiple web pages / YouTube videos from multiple authors on this device and ~all of them warning you must never connect the Vcc to 5v or it will destroy the display, I found one or two that suggested you could use 5v because in this particular module there is a built-in regulator. So, faced with the thing being useless anyway, I decided to take the plunge and connect the Vcc of the TFT to the 5v pin of the Arduino and - hey presto - it works perfectly (see picture below: note the clear full image without the reset button being held down and also notice the voltage pin of the TFT is now connected to Arduino 5v compared to the pictures in my question).

The picture below shows the back of my TFT display module and, from what I have read, it is the J3Y transistor that is key to the voltage regulation in this module.

I hypothesise that pressing the reset button must have allowed equalisation of the voltages somehow but it is beyond my knowledge to explain it. I tried measuring the 3.3v pin on the Arduino with a voltmeter while holding down the reset button but I could see no change (the TFT module was not in situ for this test so maybe there is some interaction between Arduino and the TFT circuitry during reset).
Please note: I suspect this is a peculiarity of the particular TFT display module I have. Please DON'T run your 3.3v devices at 5v unless you have good reason to believe that they can take it. I only tried this after reading a couple of pages (including the detailed specs on the TFT module seller's listing) that suggested it would be OK with my particular TFT module - your's may be different. But if you have the same problem you see in my question then maybe that is something to consider.
Thanks to those who have responded.

I had the same problem and running 5V solved it for me as well. Let's just hope it will hold in the long run.

That transistor(!) with it's two base resistors and 100R current limiting resistor is only there for the backlight. It has nothing to do with the VCC. The capacitor in between is connected between VCC and GND.

Interestingly, my 240x320 2.4" ST7789 display has exactly the same problem when connected to 5V and works well only when connected to 3V3 which is opposite compared to your display. The display was listed as 5V/3V3 but I had to use 3V3 and a level shifter. And I had to connect BL to Vcc.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Code for Degrees not
Using Audrino Nano and MKS SERVO42 42 Stepper Motor With Driver Board Closed Loop with the LCD. I have got the motor going by using the menu on board. Now able to run Code1 https://github.com/makertut/Arduino-Closed-loop.git out of GitHub and it runs as it is designed. Line 5 int numstep = 1030; cc runs the number of steps indicated and changing this number will determine the movement.
I can do the math to calculate the degrees for number of step for a particular stepper. I would like to use degrees instead of steps for my program. Does anybody know how to code this?
Thanks Greg

convert the angle to step count

You can find the number of steps per revolution in the specification of the stepper motor. Then just calculate the angle from the steps. Simple rule of three

If you can calculate the number of steps per degree you can calculate the number of degrees per step. It's high school math. Not even high school math. It's bordering on preschool math...

Thanks for reply. I said I could do the math in my question. Maybe I wasn't clear in my question or didn't supply enough info. I going to monitor multiple sensors, When one sensor is detected I want the stepper to turn to a certain degree such as 45, If another, different sensor is detected it would move to that place say 90.  Every sensor would be assign a specific degree or position.  Will steps act the same as degrees?  If  the stepper is at 90 degrees (or 50 steps) and the first sensor is then detected will it move to the 45 degree position (or 25 steps) position.   360/1.8=200

This is basic algebra 1.
Say steps / degree = 5
So write that as 2 fractions:
steps   5
----- = -
degree  1

Then take the reciprocal of both sides:
degrees   1
------- = -
step      5


text:
sro4m-2 waterproof ultrasonic sensor
I bought this waterproof ultrasonic sensor about 5 of them with the part number SR04M-2 Written on the PCB silkscreen Which is different from the usual SR04t-0.2, they are just not working, I don't know if its using a different communication protocol or its faulty because no output is coming out of the sensor at all.
if anyone out there has ever came across this type and was able to walk his/her way around it should help

compare the datasheets for the two devices ... which part of your question is about the Arduino?

Am using arduino to communicate with the sensor and its not working

there is no information about the arduino in your post ... actually, there is no question being asked ... please add relevant information, such as the sensor datasheet, the connection diagram, the arduino sketch, the description of the expected behavior and the observed  behavior, and the question that you want answered

I had exactly the same problem. The oscilloscope showed that the output is returned 500us after the digitalWrite(trigPin, HIGH), so changing the delay between trigger and pulseIn from 10us to 500us - delayMicroseconds(500), solved the problem for me.

I found this code for the SRF05 and it works for the SRO4M-2 as well.
Good Luck!
const unsigned int TRIG_PIN=13; //RX
const unsigned int ECHO_PIN=12;  TX
const unsigned int BAUD_RATE=9600;

void setup() {
  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
  Serial.begin(BAUD_RATE);
}

void loop() {
  digitalWrite(TRIG_PIN, LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG_PIN, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG_PIN, LOW);

  const unsigned long duration= pulseIn(ECHO_PIN, HIGH);
  int distance= duration/29/2;
  if(duration==0){
    Serial.println("Warning: no pulse from sensor");
  } else {
    Serial.print("distance to nearest object:");
    Serial.println(distance);
    Serial.println(" cm");
  }
  delay(100);
}

RX = trig and TX = Echo  this is counter intuitive but it works. The manufacturer did not bother to indicate trig and echo on the PCB. I discovered this on link : https://bitbucket.org/teckel12/arduino-new-ping/issues/40/aj-sr04m-board.  When I switch RX & TX as indicated in the pics it worked


text:
need to make my partners pill box turnover sensitive
ive done some arduino stuff back in uni like 7 years ago; and reserached premade items-ive looked online at many pill organisers and the best and cheapest one is $149 and isn't shipping to the UK rite now. but basically my partner needs to take 1 pill a day without fail. second set of pills is less urgent and not an issue if he misses, but basically is there like a thing I could whip together to sense when he has turned the pill case over that day or not? maybe sync to phone(would be super useful)  so he knows when he has actually taken it.

yes, there is probably something that you could build .... it is unclear how you would detect that the pill was actually swallowed

Is this a pill case that holds pills for 7 days? Surely the absence of a pill on a certain day indicates that at least it has been removed from the case (and hopefully swallowed). The "has the box turned over" gadget wouldn't prove the pill had been swallowed anyway.

I wouldn't go with a "turn-over" sensor, but would just use a (big) button. I'd go with something like an ESP8266/ESP32. Those can connect to WiFi. Then have it send a push notification when being pressed (that is; the pill has been taken). Maybe light up an LED to also indicate the pill has been taken. Turn off the led at midnight. Also send a different notification when the button hasn't been pressed before, say noon.
For push notifications, you can use PushSafer, PushBullet, or Prowl (which I had most success with).
Have a look at Kevin Darrah article, and youtube channel. He uses it's own boards, but most of the code will work on any ESP board.
But try to imaging how the system would work, in your head first. Just throwing technology at a problem isn't always the best solution. My grandma has 7 pill boxes, one for each week. Which helped to keep track of whether a pill was taken that day.
Best of luck.


text:
Blink LED 5 times with for loop
Is it possible to let a LED blink, for example 5 times, with an Arduino? Should I use a for loop?
Something like this works in setup, but it will run continuously in the void loop, so my LED keeps blinking.
for (int i = 0; i <= 5; i++) {
  led HIGH
  delay(500);
  led LOW
  delay(500);
}

Also, the blink sequence has to be triggered, and have a reset after it is done.
The complete code is too big to share, but it runs a bit like the following:
There is a "bankValue", it is filled by a user, and counts back to zero.
If it's zero, then blink 5 times.
After the blink, the LEDs are off.
The sketch is waiting for a new user, who will fill the bankValue again and the LED blink should again be initiated.

In your for-loop, which is not recommended btw, you'd need a second delay to see anything blinking. The miracle however is your new user, who will fill the bankValue. please elaborate...

@jsotola, to refrase the question: How can I let a led Blink five times?
In my defense, I added the code snippet to show what I have tried.

@DataFiddler, I know the delay is not recommended, better to use millis. It was just an example of what I have tried.
To elaborate, the program is for some kind of CarWash. The program waits for some Coins/Tokens/eMoney, which is stored in the bankValue.
When the bank is filled, the user can choose different WashPrograms. Relays will activate corrosponding the program. bankValue will decrease when using the WashProgram, until it is zero. All relays will deactviate. On this point I want a flashing LED as a sign that the bank is empty. Washing is done, and now waiting for new money input

@Niles the code, as you presented it, blinks 5 times, but it gets executed repeatedly because loop() repeats tens of thousands of times per second (if there are no delays, of course) .... to run the code only once, use a flag such as setup () {bool xyz = true;} ... then you check the state of the flag loop () { if (xyz) { blink leds; do other stuff;   xyz = false; } }  ... this will run only once, unless there is some code in loop() that sets the flag again

Its really heavy to give a correct answer, if you don't show us the context where the for loop is used. But I'll try:
There should be a part in the void loop method where you detect that the "bankValue" is down to zero. Like:
if (bankValue == 0)
{

}

First you must be sure that, the for loop is called within this block.
if (bankValue == 0)
{
  // I corrected the loop to run exact 5 times (<= -> <)
  for (int i = 0; i < 5; i++)
  {
    led HIGH
    delay(500);
    led LOW
    delay(500);
  }
}

Then you need a flag int blinkingDone = 0;  to indicate that the for loop has executed. This flag must be initialize with a falsy value, set to trueish after the loop is done and reset if the user "fills" the bankValue again.
Then you could use it as a guard to enter the for loop. Like:
int blinkingDone = 0;
int bankValue = 0;

..... somewhere else

if ( coin inserted or so )
{
  // fill bankValue
  blinkingDone = 0;
}

..... somewhere else

if (bankValue == 0 && ! blinkingDone)
{
  // I corrected the loop to run exact 5 times (<= -> <)
  for (int i = 0; i < 5; i++)
  {
    // led HIGH
    delay(500);
    // led LOW
    delay(500);
  }
  blinkingDone = 1;
}

There are potential better ways to do it. But I don't know your code. So this is the simplest way I can imagine.

This is really helpfull. I didn't expect a perfectly ready answer.
Now I know I have to work with a Flag for blinkingDone.
The code itself is on several tabs in Arduino and in total a few 100 lines. I imagine it is to much to add here. I don't know if I used the tabs correctly, but that is something for another thread
Again, this is really helpfull

in the line
if (bankValue == zero && ! blinkingDone)
what is the meaning of the !

It's the not operator. It means "blinking is not done". Ahh and the line contains a typo zero must be 0. I should really think before writing ;-)


text:
SIM800C status LED not blinking
I am using an Allwin HW-537 SIM800C module. I am also using a 3.7V 2200mAH ICR18650-22F battery which discharges about 4-5 amps according to the datasheet.
However, I am unable to get the status LED on the module blinking.
I have tried using a multimeter to measure the voltage and it was 3.7V.
I did some digging and found a thread on a similar issue with the SIM800L Module where it was fixed by shortening the connection to reduce resistance.
I tried that and still, no luck. I also checked the LED and it works fine.
Am i doing something wrong? Or is the current too high?

5.18A? I'll bet you just put the probes straight across the battery to measure that, didn't you?

yes I did , that is a mistake i presume

Yes. You measure current through things, not across them. To measure current you should disconnect one of the power connections from the battery then connect the ammeter in between that power connection and the battery. Putting a DMM in amps mode (or any ammeter) directly across a battery is basically making a short circuit and will potentially damage both the battery and the DMM. You're lucky you didn't blow the fuse in the DMM at the very least.

Thank you very much. That is a great piece of advice. I am fairly new to electronics and this will help a great deal


text:
Seems like I cant control 4 stepper motor at once
Im trying to control 4 stepper motors with the AccelStepper library.
Something like this:
AccelStepper FL(1,stepPin,dirPin);
AccelStepper FR(1,stepPin2,dirPin2);
AccelStepper BL(1,stepPin3,dirPin3);
//AccelStepper BR(1,stepPin4,dirPin4);

The problem is, It works just fine if I declare 3 instance of the AccelStepper, but once I uncomment the 4th one there's an error.
Error message: Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default, 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

In file included from C:\Users\Parit\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1/tools/sdk/include/esp32/xtensa/xtruntime.h:30:0,

                 from C:\Users\Parit\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1/tools/sdk/include/freertos/freertos/portmacro.h:80,

                 from C:\Users\Parit\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1/tools/sdk/include/freertos/freertos/portable.h:94,

                 from C:\Users\Parit\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1/tools/sdk/include/freertos/freertos/FreeRTOS.h:105,

                 from C:\Users\Parit\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1\cores\esp32/Arduino.h:32,

                 from sketch\Test_file.ino.cpp:1:

C:\Users\Parit\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1/tools/sdk/include/esp32/xtensa/config/specreg.h:40:13: error: expected unqualified-id before numeric constant

 #define BR  4

             ^

C:\Users\Parit\Desktop\Test_file\Test_file.ino:31:14: note: in expansion of macro 'BR'

 AccelStepper BR(1,stepPin4,dirPin4);

              ^

Multiple libraries were found for "WiFi.h"

 Used: C:\Users\Parit\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1\libraries\WiFi

 Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries\WiFi

exit status 1

Error compiling for board ESP32 Dev Module.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Im not sure if the problem is the ESP 32 or the code. I use the A4988 driver to connect with all 4 stepper motors.

Please show the complete error message

Not in the comments please. You can add this information to your question by editing it

ok sorry, i'll add it now

The variable name BR is already used somewhere else.
Use a different variable name
AccelStepper FL(1,stepPin,dirPin);
AccelStepper FR(1,stepPin2,dirPin2);
AccelStepper BL(1,stepPin3,dirPin3);
AccelStepper BackRight(1,stepPin4,dirPin4);

Thank you ! It's working now. But it's weird, I can confirm that I haven't used a variable with that name any where in my code/

It's explained in the error message. It says BR is defined as a constant with value 4 ( #define BR  4)

Alright, but still, I didn't write  "#define BR 4" In my code. Anyways, it's working now so it doesn't matter, Thanks.

The first definition necessarily in your code - it may be in one of the libraries your code included.

According to the error message it's inside the file specreg.h. Try reading the error messages you get. They contain a lot more information than you'd think. They can be a bit overwhelming at first, but after a few of them you'll get a feel for what's relevant, and what to look for.


text:
Sensor that detects when metal sieve is clogged with debris
I'm a newbie here and would really appreciate all kinds of suggestions and answers from the experts here.
I am trying to make a small grey water recycling system project, and for the my primary filtration process tank, I will be using a combination of Metal Sieve and Cloth filter medium.
The problem is, I will be making the system alert the user when filters are in need of changing and maintenance.

I made a quick sketch of my idea on paint, and as you can see, I am planning to make my grey water collection tank to look that way.
I am thinking of using pressure sensor to sense the change of weight in the sieve and cloth part of the tank for a minimum amount of time so that the system will not confuse water flow weight vs. the weight of the debris on the metal sieve, but I'm thinking that the pressure sensor is not waterproof.
I'm also thinking of like the laser module, and when the light breaks at certain level, meaning there is too much debris that has to be removed.
I also googled load cells or weight sensors, but I'm really sorry I'm new to this, I don't know what is the best sensor to use for my problem.
I'm thinking of a float switch a few inches on top of my metal sieve and cloth and when it does not go on a OFF state for a certain amount if time, then the sieve is clogged, but my tank could overflow..
I need something that, when the sieve is clogged, the tank will no longer accept grey water input to avoid overflow.
It has to be submersible in water too :'(
Is there a type of sensor that is most suitable for my problem?
Thank you so much everyone. Have a nice day.

I'm confused by your drawing.  Where does the grey water enter the system?  At the top?

even though this is a very interesting project, it is not related to the Arduino

@jsotola, I'm sorry, how is it not related to Arduino? I will be using Arduino to control everything, the pumps, the stuff that displays on the LCD, the switches and leds.

@PeterM im sorry, yes the water comes from the top.. and then exits from the hose connected to the pump, which is the blue colored part

@melanieirenedeocampo your question would be unchanged if you planned to use a Raspberry Pi or if you built your own controller ... that makes the Arduino irrelevant, and makes this question not about Arduino

perhaps you could shut off the inflow briefly and weigh the filter

Weighing the filter is the wrong approach, because a few large rocks will weigh a lot and not impede the flow very much.  A lot of fine sand just too large to go through the filter will be a problem.  You should use a pressure measurement as the answers suggest.  The problem is that the pressure drop across the filter is too large.

I would tackle this not from the point of view of the filter, but from the point of view of the water itself.
The water will be impeded by the filter. As the filter gradually clogs that impediment will increase.  The net result will be a slower flow of water through your filter.
There's a number of things you could do to detect that:

Measure the incoming water flow rate and the outgoing water flow rate and calculate the difference.

This would mean having all the water flowing through two flow meters which would complicate your design as the filter will no longer be able to deposit directly into the tank. But when the difference in flow between the in and out sensors gets above a certain point (to be determined by you) then you can safely say that the filter is blocked.

Measure the "backlog" of water. To do this the input portion of the filter will have to be sealed (or largely sealed). Again the filter will impede water flow, and the more it's clogged the more it impedes. Once the impediment becomes too high the water will start "backing up" up the input pipe as it can't get through the filter fast enough. At this time you can detect that rise in water level with a float switch.

You'd have a simpler design now, as the filter can deposit straight into the tank. Whether you want to detect the rise in water level in the incoming pipe itself or in the gap between the filter and where the pipe comes in depends largely on the size of your filter. With a large filter it may be better to have a smaller space at the top and measure in the pipe. That will "amplify" the level rise and make it easier to detect.

"The net result will be a slower flow of water through your filter." Actually, IIRC, the result of constricting the area that water flows through will increase its speed but decrease its pressure. https://en.wikipedia.org/wiki/Bernoulli%27s_principle

@nick012000 I do electronics, not fluid dynamics. All I know is when my sink gets blocked it backs up and takes longer to empty. What mechanics that's due to I neither know nor care about, but it does happen. I can prove it.

Have you considered a Differential Pressure Sensor, They can be gotten for a few dollars complete with the basic electronics and drift compensation on board.  Try looking for: nxp pressure sensor for a start. These will interface to the Arduino A/D.  I use an absolute one for barometric pressure and a differential to measure the air pressure my fish pond, this tells me if the air line is open or broken.

You could probably improve this answer by discussing Bernoulli's Principle and explaining why there's a drop in pressure.

I am measuring differential pressure not flow. That is a common method of measuring filters to determine when they are due to be changed and or cleaned. The Metal Sieve and Cloth filter medium is the filter.

It seems to me what you want to detect is when the filter starts backing up and the flow of water out of the filter can't keep up with the in-flow. That will let you turn off the in-flow before the tank overflows.
So put a float switch or other level sensing switch on the space above the filter. Set it so it trips when the water standing on top of the filter gets close to the top of the tank. If the filter gets clogged and the water can't flow through fast enough, the water level on top of the filter will start to rise, and when it gets high enough, the level sensor will trip and your Arduino can shut off the flow of gray water into the filter tank.


text:
How can I measure maximum range of my ohm meter?
Hello everyone I am working on a project that will measure ohm value of a resistor .
Schematic / article link
https://create.arduino.cc/projecthub/iasonas-christoulakis/how-to-make-an-arduino-ohm-meter-90fda8
And
Here is the code below
int analogPin= 0;
int raw= 0;
int Vin= 5;
float Vout= 0;
float R1= 1000;
float R2= 0;
float buffer= 0;

void setup()
{
 Serial.begin(9600);
}

 void loop()
{
raw= analogRead(analogPin);
if(raw)
{
buffer= raw * Vin;
Vout= (buffer)/1024.0;
buffer= (Vin/Vout) -1;
R2= R1 * buffer;
Serial.print("Vout: ");
Serial.println(Vout);
Serial.print("R2: ");
Serial.println(R2);
delay(1000);
}
}

There need to be a known and another unknown resistor.
The ohm value of known resistor is supposed to be 1k ohm
So my question is, what is the max ohm range will my arduino ohm meter be able to measure of the unknown resistor with 1k reference resistor and how to calculate it?
5 - 10% accuracy is enough for me
Thanks for giving me your attention :D

https://create.arduino.cc/projecthub/iasonas-christoulakis/how-to-make-an-arduino-ohm-meter-90fda8

Your question would make more sense if you gave an acceptable error percentage. You could read virtually any resistor, it just might be 100% wrong. Would 50% do? How about 10%? 1%?

@Nick Gammon almost 5% to 10%

Your resolution of the ADC (the analogRead) will be 1/1024 * 5V (since you get a reading in the range 0 to 1023), that is, you can tell the difference in increments of 5/1024 which is 0.00488V, so say roughly 0.005V.
Now, I wrote a little bit of code to work out the voltages that you would get with various values for your varying resistor:
r1 =      0, v = 5.000
r1 =    100, v = 4.545
r1 =    200, v = 4.167
r1 =    300, v = 3.846
r1 =    400, v = 3.571
r1 =    500, v = 3.333
r1 =    600, v = 3.125
r1 =    700, v = 2.941
r1 =    800, v = 2.778
r1 =    900, v = 2.632
r1 =   1000, v = 2.500
r1 =   1100, v = 2.381
r1 =   1200, v = 2.273
r1 =   1300, v = 2.174
r1 =   1400, v = 2.083
r1 =   1500, v = 2.000
r1 =   1600, v = 1.923
r1 =   1700, v = 1.852
r1 =   1800, v = 1.786
r1 =   1900, v = 1.724
r1 =   2000, v = 1.667
r1 =   3000, v = 1.250
r1 =   4000, v = 1.000
r1 =   5000, v = 0.833
r1 =   6000, v = 0.714
r1 =   7000, v = 0.625
r1 =   8000, v = 0.556
r1 =   9000, v = 0.500
r1 =  10000, v = 0.455
r1 =  20000, v = 0.238
r1 =  30000, v = 0.161
r1 =  40000, v = 0.122
r1 =  50000, v = 0.098
r1 =  60000, v = 0.082
r1 =  70000, v = 0.070
r1 =  80000, v = 0.062
r1 =  90000, v = 0.055
r1 = 100000, v = 0.050
r1 = 110000, v = 0.045
r1 = 120000, v = 0.041
r1 = 130000, v = 0.038
r1 = 140000, v = 0.035
r1 = 150000, v = 0.033
r1 = 160000, v = 0.031
r1 = 170000, v = 0.029
r1 = 180000, v = 0.028
r1 = 190000, v = 0.026
r1 = 200000, v = 0.025
r1 = 210000, v = 0.024
r1 = 220000, v = 0.023
r1 = 230000, v = 0.022
r1 = 240000, v = 0.021
r1 = 250000, v = 0.020
r1 = 260000, v = 0.019
r1 = 270000, v = 0.018
r1 = 280000, v = 0.018
r1 = 290000, v = 0.017
r1 = 300000, v = 0.017

You can see that the difference in voltage is only 0.005V (the ADC resolution) between r1 of 90k and 100k. Further down, you can't tell the difference (within 0.005V) of 270k and 300k.
I'm not sure how to express that as an error percentage, perhaps someone better at maths than me can do that. :)

So does that literally mean that I can measure max 100k resistor with 1k reference resistor? Sorry to say but ur explanation has confused me a little bit.

I'm not saying that, but if you look at the voltage for 200k (0.025V) and 250k (0.020V), then you won't be able to tell the difference between 200k and (say) 220k. So you might say, for 200k that it would be +/- 50k. That is your error amount. So you could measure a 200k resistor, but the error amount would be 50/200, that is 25%. Now for 100k, it would appear to be 10/100, or 10%. Subject to my arithmetic being right, that would seem to indicate that 100k is about your limit, if you want 10% accuracy or better.

There would be a reason why cheap multimeters want you to choose a range for resistance measurement, they probably swap in an appropriate reference resistor to give a reasonable error amount for the range you are measuring.

Ok thanks , getting it clear now

Even the very expensive ohm meters switch range, it may be transparent to you but they do. I have repaired and calibrated many over the years and they all did it.

How? I suppose one way would be to have half a dozen reference resistors, and use a MOSFET to switch the signal being measured into one rather than the other (in other words, multiplex it).

@Nick, yes I am working on a auto ohm meter with my UNO , some MOSFET and resistors of 1k 22k 47k 100k and 220 k which's maximum range should be 1m+ . All u have to do is that, get values from reference resistor then logically edit it, to switch them automatically


text:
Switching from one color to another
I'm using ws2812b 2x2 LEDs and have it switching between green and red, but only one of my LEDs on my 2x2 is lighting up.
I'm using the "blink" FastLED sketch with Data pin 3 on my Arduino Uno, define led 4.
void loop() {
 // Turn the LED on, then pause
 leds[0] = CRGB::Red;
 FastLED.show();
 delay(5000);
 // Now turn the LED off, then pause
 leds[0] = CRGB::Green;
 FastLED.show();
 delay(5000);
}

Sorry i'm a Total Rookie, my question is how come only 1 of my 4 led's is blinking, did i miss something in the code.

your code blinks only one led ... have a close look at your code ... see if you can figure out how to light a different led ... also have a look at the example code in the arduino IDE

For changing the led color or making any other led to glow you have to put the led number instead of leds[led number]  in this case so your code will basically look like.
void loop() {
 // Turn the LED on, then pause
 leds[0] = CRGB::Red;
 leds[1] = CRGB::Red;
 leds[2] = CRGB::Red;
 leds[3] = CRGB::Red;
 FastLED.show();
 delay(5000);
 // Now turn the LED off, then pause
 leds[0] = CRGB::Green;
 leds[1] = CRGB::Green;
 leds[2] = CRGB::Green;
 leds[3] = CRGB::Green;
 FastLED.show();
 delay(5000);
}

Hope this helps

Thanks Guys, i assumed that my #define NUM_LEDS 4 would have made all 4 work but it is doing what i want it to now, thanks alot you guys

This is an addition to the answer of xbox gamer (which I upvoted), to prevent much duplicated code.
For loop
First we see, the 4 LEDs are made red or green (using green in the following case):
leds[0] = CRGB::Green;
leds[1] = CRGB::Green;
leds[2] = CRGB::Green;
leds[3] = CRGB::Green;

For this a for loop can be used counting from 0 to (excluding) 4:
for (led = 0; led < 4; led++)
{
    leds[led] = CRGB::Green;
}

Variant 1: Color argument
Next we see the first and last lines are almost identical. For this we can make a function, and change the variable items (like the color) with a variable passed to that function, which is called an argument:
First we create the loop function:
void loop()
{
   turnLEDs(CRGB::Red);   // Turn LEDs on (i.e. red), then pause
   turnLEDs(CRGB::Green); // Turn LEDs off (i.e. green), then pause
}

Then we need to make just a single function to change the color (place this before the loop function. The type of the color is enum HTMLColorCode, see http://fastled.io/docs/3.1/struct_c_r_g_b.html.
void turnLEDs(enum HTMLColorCode color)
{
    for (led = 0; led < 4; led++)
    {
        leds[led] = color;
    }
    FastLED.show();
    delay(5000);
}

Variant 2: Boolean argument
Another way, is to not pass the color, but pass ON or OFF, which is a boolean.
For this we can use the so-called ternary operator: a ? b : c which means: if a is true, use b, otherwise c. We get:
void turnLEDs(bool enable)
{
    for (led = 0; led < 4; led++)
    {
        leds[led] = enable ? CRGB::Red : CRGB::Green;
    }
    FastLED.show();
    delay(5000);
}

void loop()
{
   turnLEDs(true);
   turnLEDs(false);
}


text:
Send custom HID values instead of keys
I've been building a small macro keypad based on the ATmega32U4. So far, I've been able to send standard key presses to the host. But since I want a program on the host system to react to the key presses, I only send the keys to serial to avoid typing anything. For now, this does work.
I want to send custom HID values to the host which won't result in regular key presses. As I've been reading around different blog and forum posts, most of them are just about building a regular keyboard or gamepad but don't go into how to make use of anything else.
This is what I got so far:
#include <Keypad.h>

const byte rows = 3;
const byte cols = 5;

char keys[rows][cols] = {
  { '1', '2', '3', '4', '5' },
  { 'q', 'w', 'e', 'r', 't' },
  { 'a', 's', 'd', 'f', 'g' }
};

byte rowPins[rows] = { 10, 16, 14 };
byte colPins[cols] = { 9, 8, 7, 6, 5 };

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, rows, cols );

void setup(){
  Serial.begin(9600);
}

void loop(){
  char key = keypad.getKey();

  if (key != NO_KEY){
    Serial.println(key);
  }
}

The only obvious way I see to achieve this is to change the keys array but I don't know to which values.

UPDATE
I changed the code according to the answer by Majenko:
#include <HID-Project.h>
#include <HID-Settings.h>

uint8_t rawhidData[255];

byte rows[] = { 10, 16, 14 };
byte cols[] = { 9, 8, 7, 6, 5 };

const int rowCount = sizeof(rows)/sizeof(rows[0]);
const int colCount = sizeof(cols)/sizeof(cols[0]);

void setup() {
  for (int row = 0; row < rowCount; row++) {
    pinMode(rows[row], OUTPUT);
    digitalWrite(rows[row], HIGH);
  }

  for (int col = 0; col < colCount; col++) {
    pinMode(cols[col], INPUT_PULLUP);
  }

  RawHID.begin(rawhidData, sizeof(rawhidData));
}

void loop() {
  for (int row = 0; row < rowCount; row++) {
    digitalWrite(rows[row], LOW);

    for (int col = 0; col < colCount; col++) {
      if (digitalRead(cols[col]) == LOW) {
        String coordinatesString = String(row+1) + String(col+1);
        uint8_t coordinates = coordinatesString.toInt();

        uint8_t megabuff[sizeof(coordinates)];

        megabuff[0] = coordinates;

        RawHID.write(megabuff, sizeof(megabuff));

        while (digitalRead(cols[col]) == LOW) {
          delay(50);
        }
        break;
      }
    }

    digitalWrite(rows[row], HIGH);
  }
}

I removed the serial output since I don't need that anymore. The code looks crude and needs further refactoring but it does work.

HID is a strange beast to get your head around.
It operates by way of "Report Descriptors". These are "maps" that lay out what the values you send mean. It's these descriptors that make a keyboard a keyboard and a mouse a mouse.
When you use Keyboard.h you attach a Keyboard report descriptor to the USB HID endpoint, and the computer knows to interpret the data coming in as keypresses. When you use Mouse.h you attach a Mouse report descriptor and the computer knows to interpret the data coming in as mouse movements and button presses.
If you want your computer to ignore the data that you send and allow your own program to be able to receive the raw data instead then you need to use a descriptor that the computer doesn't recognise. In such a case it just ignores the data.
There's a "Raw HID" library for Arduino that does that - it uses a "blank" report descriptor that just gives you a plain 64 byte block of data to do what you want with.
There's a good HID library by Nico Hood that implements the raw mode (as well as others).
For receiving the data on your computer you will have to have your program directly interface with the USB HID system. There's plenty of libraries for most languages to do this for you (hidapi in C / C++, hid in Python, hid4java for Java, etc).

Great information. For anyone looking, there is a critical bug in referenced HID library that breaks RawHID.write(); . Be aware of this bug before proceeding down that path. https://github.com/NicoHood/HID/issues/133


text:
ESP-NOW with esp32 and esp8266
I want to use ESP-NOW with esp32 and esp8266. The esp32 will mostly send data to esp8266.I was not able to find any good tutorial on YouTube to achieve this. The only videos I found was for either communicating with esp32 to esp32 or esp8266 to esp8266. Is it possible to do this if yes how.

https://github.com/yoursunny/WifiEspNow

It is likely someone down voted you because you gave no indication you have tried something before asking your question.  Also, your question is perhaps a bit broader then you realize and would be easier to deal with on stackexchange sites such as this one if broken down into more specific inquires.  That said, I'm going to try and provide a GENERAL answer that will require you to follow up and read the links provided by @Majenko.

@majenko thanks

In general, ESP-NOW uses the WIFI radio in an ESP processor as a physical layer.  But uses it's own protocol which likely looks like garbage to a normal WIFI equipment.  So, it's like being in a meeting room with a bunch of people only knowing German and occasionally someone pipes up taking French.  As no one understands the French speaker, the French speaker is ignored.
Other things you need to know.  ESP-NOW is more like UDP.  There is not a higher layer looking out for you like in TCP.  Any number of reasons can cause your ESP-NOW "blurp" from being received.  For this reason ESP-NOW is better suited for periodically repeating information.  Like reporting the temperature.  Or for situations where the user can provide immediate feed back of success.  Such as a remote control.

The esp32 will mostly send data to esp8266

This infers reversing the direction of data flow over the ESP processor's WIFI radios.  While this may be possible it may not be a trivial task.

Is it possible to do this (communicate between an esp32 and esp8266) if yes how.

This shouldn't be problem.  This link provided by Majenko appears to be a good place to start.  Espressif them selves maintains this ESP-NOW web site.  Likely, after programming the ESP8266 and ESP32 using the correct libraries, they will be able to send data over an ESP-NOW link.


text:
Crash when disabling bluedroid
i have an ESP32 and i want to use deepsleep when it's not used. Before sending it to sleep i clean up everything, so disconnect, deinitialize and disable everything i build before. But i get a crash when i try to disable bluedroid. Does anyone have an idea why this happens?
void bt_deinit() {

    Serial.println("Deinit AVRC");
    if (esp_avrc_ct_deinit() != ESP_OK)
        Serial.write("Failed to deinit avrc");

    Serial.println("Deinit A2DP");
    if (esp_a2d_source_deinit() != ESP_OK)
        Serial.println("Failed to deinit a2dp");

    Serial.println("disable bluedroid");
    if (esp_bluedroid_disable() != ESP_OK)
        Serial.println("Failed to disable bluedroid");

    Serial.println("Deinit bluedroid");
    if (esp_bluedroid_deinit() != ESP_OK)
        Serial.println("Failed to deinit bluedroid");

    Serial.println("Stop BT");
    if (btStop() == false)
        Serial.println("Failed to stop bt");
}

output:
Port closed
Uploading to I/O board
Opening port
Port open
Hello there!
Bluetooth init success
good night
Deinit AVRC
Deinit A2DP
disable bluedroid
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:719 (xQueueGenericSend)- assert failed!
abort() was called at PC 0x4008de6f on core 0

Backtrace: 0x40091918:0x3ffce3b0 0x40091b49:0x3ffce3d0 0x4008de6f:0x3ffce3f0 0x4013bfb6:0x3ffce430 0x4013c5f6:0x3ffce460 0x400fdbe2:0x3ffce480 0x400fdc35:0x3ffce4a0 0x400fe12e:0x3ffce4c0 0x400f6bd9:0x3ffce4e0 0x4008e559:0x3ffce510

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Hello there!
Bluetooth init success

it works fine if i just do not deinitialize everything and send him directly to sleep. But this is not the elegant way.

upvote for well presented question ... sadly I do not have the expertise to help you ..... perhaps something has not finished shutting down .... insert a delay before disabling bluedroid .... maybe it is the order of events ..... maybe stop first, then disable .... possibly the reverse order of the startup sequence

decoded backtrace in your question is missing, one of the choices to see stack trace is https://github.com/littleyoda/EspStackTraceDecoder
i dont know exactly if this is your case or not, but calling esp_ble_gap_stop_scanning() before esp_bluedroid_deinit() possibly avoids your crash.


text:
Can AccelStepper accelerate non-linearly?
I am running a Nema 23 motor with an Arduino Uno and a microstepper driver. I am making a torsional vibration demo, which uses a series of springs connected to the motor driveshaft to spin gears. These gears, as changes in shaft speed occur, should begin to weave in- and out-of-phase with one another. In my particular case, I am using three potentiometers, which read 0-1023, to read speed, amplitude, and frequency.
The changes in motor speed are where I run into my issues. I need the speed of the stepper to be a sinusoidal function - of the form "Speed - Amplitude x sin(frequency x time)".
Below is some rudimentary code I put together with the AccelStepper library, which does not work:
#include <AccelStepper.h>

/* Using a stepper motor,
  rotate a vibrational model using gears interconnected by springs
  in such a way as to induce torsional vibration, which should be visible by comparing
  movement of juxtaposed rotating gears with markers painted on. */

AccelStepper stepper(AccelStepper::DRIVER);
void setEnablePin(int enablePin = 8);

int Microstepping = 8; /* Microstepping factor, as set on the ST-M5045 control board.
                          Multiplies the number of steps per revolution on the stepper motor.
                          Reference controller manual for adjustments to this number. */
int Steps = 200; /* Number of steps on your stepper motor.*/
int SPS;
int Amp;
int Freq;
// int SC;
int n = 2;
int i;
int totalSteps = Microstepping * Steps;
int currentPosition();

/* It should be noted that the Microstepping and Steps factors are not necessary, and adjusting the microstepping factor
    on the fly will not break the code. However, be aware that changing the microstepping factor by more than one interval
    at a time can cause the motor to not keep up with the sudden changes, i.e. losing torque or vibrating/stuttering. */

void setup() {               // THIS RUNS ONCE //

  Serial.begin(9600);

  // read potentiometers; raw inputs from 0 to 1023 //
  SPS = analogRead(0) * 0.5; // MAX steps per second should be <1000. Speeds above 1000 unreliable, according to AccelStepper docs.//
  Amp = analogRead(1) / 20;   // MAX AMP ~51//
  Freq = analogRead(2) / 170; // MAX FREQ ~12 Hz//

  stepper.setMaxSpeed(1000);
  stepper.setAcceleration(SPS / 1.5);

  int nextStop = totalSteps / Freq;

  stepper.moveTo(nextStop);
  stepper.run();
  Serial.println("INITIALIZED");
}

void loop() {
  SPS = analogRead(0) * 0.95;
  Amp = analogRead(1) / 20;
  Freq = analogRead(2) / 170;

  float spd = SPS + (Amp*sin(Freq*millis()));
  stepper.setSpeed(spd);
  stepper.run();
  Serial.print("speed:  ");
  Serial.println(spd);
}

The issue I am having with the above code is that it enters the loop but does not vary the speed, despite the serial output showing me a speed which oscillates about the desired value several times a second.
And now, folks, what you've all been waiting for: The Point.
Does AccelStepper actually support non-linear accelerations not as the result of an error? I cite the following excerpt from the AccelStepper documentation,
 /// Sets the maximum permitted speed. The run() function will accelerate
 /// up to the speed set by this function.
 /// Caution: the maximum speed achievable depends on your processor and clock speed.
 /// The default maxSpeed is 1.0 steps per second.
 /// \param[in] speed The desired maximum speed in steps per second. Must
 /// be > 0. Caution: Speeds that exceed the maximum speed supported by the processor may
 /// Result in non-linear accelerations and decelerations.
 void    setMaxSpeed(float speed);

which makes the only mention of non-linear acceleration in all of the documentation - in the context of an overflow error.
I've thought of possibly using a modified version of the easydriver example program from reply #3 to this post if AccelStepper isn't capable of doing what I need it to do. Included is also an image of the system (minus the arduino and controller).
Thanks for your help in advance

I appreciate the votes for exposure! Here is the answer I got from Mike, the creator of AccelStepper himself: link
Short answer: no!
I've posted the program I'm using now, which accelerates nonlinearly using pulse timing variation, in the linked thread.
Happy stepping!


text:
Sim800L not working
I have been trying to set up the SIM800L. The LED is not blinking...
I am using the LM2596 to convert from 5V to 4.3V (I did try with 3.7 <= Vout <=4.3 V) to power the module. With a 5V/2A power supply nothing works aswell.

Any ideas? Thanks in advance!

Have you tried connecting it to an Arduino at any point?

is the LED supposed to blink?

Yes, I did connect to test AT commands. The LED should blink since I am powering the module.

have you checked the power supply voltage at the SIM800L module power pins?

the soldering job on the module pins looks questionable .... please provide a clear closeup of the module

I did check for continuity with a multimeter and the solder joints although not great, they conduct. I have at the module 4.2/4.3 V.

According to this site if you give more than 2.8V on the SIM800L you will kill the module.


text:
IR output won't stop
So I basically tried to control a Servo motor with an IR Remote. I'm a complete newbie in arduino programming but I just took some things from other scripts and tried them out until It worked, and it kinda did but my main problem is that as soon as I press a button the action is exectuted but the command like left arrow on the remote control just spams over and over again so I cannot have an action after that one
`
#include "IRremote.h"
#include "IR.h"
#include <Servo.h>

int receiver = 11;

IRrecv irrecv(receiver);     // create instance of 'irrecv'
decode_results results;      // create instance of 'decode_results'
Servo myservo;

void setup() {
  Serial.begin(9600);
  Serial.println("IR Receiver Button Decode");
  irrecv.enableIRIn();
  myservo.attach(9);
  myservo.write(0);
}

void loop()
{
if (irrecv.decode(&results))
 {
   //  irrecv.resume();   // Receive the next value
  // }
  //if (results.value == 0xFF629D)  // change according to your IR remote button number
  //  {
    //  myservo.write(0);
      //delay(15);
   // }
    //if (results.value == 0xFF629D)  // change according  to your IR remote button number
    //{
     // myservo.write(30);
    //delay(15);
    //}

      switch(results.value)
  {
  case 0xFFA25D: Serial.println("POWER"); break;
  case 0xFFE21D: Serial.println("FUNC/STOP"); break;
  case 0xFF629D: Serial.println("VOL+"); break;
  case 0xFF22DD: Serial.println("FAST BACK");
  myservo.write(90);
  delay(15);
  break;
  case 0xFF02FD: Serial.println("PAUSE");    break;
  case 0xFFC23D: Serial.println("FAST FORWARD");
  break;
  case 0xFFE01F: Serial.println("DOWN");    break;
  case 0xFFA857: Serial.println("VOL-");    break;
  case 0xFF906F: Serial.println("UP");    break;
  case 0xFF9867: Serial.println("EQ");    break;
  case 0xFFB04F: Serial.println("ST/REPT");    break;
  case 0xFF6897: Serial.println("0");    break;
  case 0xFF30CF: Serial.println("1");    break;
  case 0xFF18E7: Serial.println("2");    break;
  case 0xFF7A85: Serial.println("3");    break;
  case 0xFF10EF: Serial.println("4");    break;
  case 0xFF38C7: Serial.println("5");    break;
  case 0xFF5AA5: Serial.println("6");    break;
  case 0xFF42BD: Serial.println("7");    break;
  case 0xFF4AB5: Serial.println("8");    break;
  case 0xFF52AD: Serial.println("9");    break;
  case 0xFFFFFFFF: Serial.println(" REPEAT");break;
  default:
    Serial.println(" other button   ");`

That's my code, and whenever I press like Fast Back I can't do anything else and the Serial Monitor is just full of Fast Back

Put back in the irrecv.resume() that you commented out?

what happens if you press VOL+?

@Majenko Thank you very much, ther commented out one acutally had nothing to do with it but I had to add one at the end of the switch


text:
can we make Drone with Dc 180 motor and Arduino?
I want to make a drone as a project for my university, But I am kinda newbie in this, I did many searches about this and I found I should do it with the brushless motors (BLDC) but I can't buy this kind of motors, So I want to do it with DC motors I found in youtube there is motor can be used in the drone it called ( 180 dc motor) but they didn't use them with Arduino.
My question is can I use Dc 180 motor with Arduino and make a drone Or Not?

https://youtu.be/J0x4ChjUS00 not exactly what u wanted but it is also using brushed motor if u want u can give this a try

Yes you could but you will have to use a motor driver or else the motors will not be able to get enough power and try using arduino micro or an esp32 if you want to use it with Bluetooth which will also help you to keep the weight down.

Yes I saw it, but he didn't use Arduino he used transmitter and receiver, I want to connect it with my Arduino and my code and thank you aalot

Sorry your question didn't fully load on my phone I have updated my answer

So if I want connect it with Arduino i need 1. motor driver and micro And Nano will work too right? , and drone will work 100%? Thank you very much

Yes it will work with arduino Nano just try keeping the weight of the drone as less as possible and you can also use transistor insted of a motor driver I suggest watching this video : https://youtu.be/J0x4ChjUS00

maybe this is a dumb question, but what the point of using motor driver and transistor? yes thanks about the video

You have to use a transistor or a motor driver because an Arduino has a maximum output of 5v 40ma on its digital pins which is not enough for these motors. they are used to mainly supply voltage and current to the motors as the current input of the motors can go as high as 0.80amps

Thank you a lot


text:
loop once per startup for stepper motor
First of all sorry that i dont know much about programming, most of my codes are just copy paste. And of course, i know this question has been asked before, but while using this code:
#include <AccelStepper.h>

AccelStepper stepper (1,7,6);

void setup() {
  // put your setup code here, to run once:

 stepper.setMaxSpeed(100);

 stepper.setAcceleration(20);

  stepper.runToNewPosition(100);

 delay (1000);

stepper.runToNewPosition(0);

delay(1000);

}

void loop() {
  // put your main code here, to run repeatedly:

}

The code worked perfectly once but after resetting the power the code doesnt work in a way that my stepper motor just idles.  Obviously what I want is for the stepper motor to execute the code once per power on. Is there something that i miss? many thanks!

I have never used a stepper motor but check the wiring again and insted of using arduino for programing use platform.io it will help you to understand and complete the code faster it at least helped me a lot

run an example code from the arduino IDE just to verify hardware

don't forget that there is no feedback from the motor .... maybe the driver chip is unpowered or it is incorrectly connected or it is defective

For setup() there's no difference between power on and reset.
Eventually there are subtle ones (hardware dependent -> reason of reset), but not on the Arduino layer.


text:
Adafruit_LEDBackpack library interfering with analog input reading
I'm trying to do something I think would be simple. I'd like to read the input of a electret microphone board and update the Adafruit 24-segment LED Bar Graph. I got each individual item working perfectly: I can read the input of the microphone on the analog pin and I can update the LED bar graph using I2C.
The issue occurs when I tried to combine the two concepts. When the bard graph gets updated, the analog input reads HIGH (1023) and never changes. I used my standard debug method and commented out code until the problem went away, so I've narrowed down the issue to a single line of code (right at the end). When the bar.writeDisplay is called the analog input perpetually reads 1023.
If I comment out that one line of code and re-upload my sketch the readings (in the Serial Monitor) are as expected (lower when its quiet and higher when its loud).
Under the hood Adafruit is using the Wire library.
I'm no good at wiring diagrams, but here's what I have:
RoboDyn Mega 2560 Pro (Embed)
5V, Gnd, SDA (20), SCL (21) to the LED Backpack
5V, Gnd, Out (A15/69)
That said, I'm relatively confident this is not a wiring problem as everything works until the software gets ahold of it.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"

Adafruit_24bargraph bar = Adafruit_24bargraph();

int pin = 69;
unsigned int sampleWindow = 50; // millis
unsigned int maxScale = 24;

void setup() {
  Serial.begin(9600);
  bar.begin(0x70);  // pass in the address
}

void loop() {
  unsigned long startMillis = millis();  // Start of sample window
  unsigned int peakToPeak = 0;   // peak-to-peak level
  unsigned int sample;
  unsigned int signalMax = 0;
  unsigned int signalMin = 1024;
  while (millis() - startMillis < sampleWindow) {
    sample = analogRead(pin);
    if (sample < 1024) {  // toss out spurious readings
      if (sample > signalMax) {
        signalMax = sample;  // save just the max levels
      }
      else if (sample < signalMin) {
        signalMin = sample;  // save just the min levels
      }
    }
  }
  peakToPeak = signalMax - signalMin;
  int displayPeak = map(peakToPeak, 0, 1023, 0, maxScale); // map 1v p-p level to the max scale of the display
  Serial.print("mic: "); Serial.print(peakToPeak); Serial.print(" "); Serial.println(displayPeak);
  for (uint8_t b = 0; b < 24; b++) {
    if (b <= displayPeak) {
      int c = LED_GREEN;
      if (b >= 20) {
        c = LED_RED;
      }
      else if (b >= 16) {
        c = LED_YELLOW;
      }
      bar.setBar(23 - b, c);
    }
    else {
      bar.setBar(23 - b, LED_OFF);
    }
    //bar.writeDisplay(); // <------- THIS LINE
  }
}

UPDATE: It appears to be something with the way Adafruit uses the Wire library. I have a similar problem when I use the Adafruit 7-segment library, when I use their MCP23017 library.
But it is wiring related too. If I uncomment the commented out line above but disconnect the I2C device the analog input starts working again.
One more thing I've discovered: it depends on how many lights are lit on the I2C board. Once all the lights are lit, the analog pin reads full. When only a couple of lights are lit, the values are lower. It is like the voltage going into the mic is higher when the lights are brighter.
For curiosity sake, I tried the same thing on a different Arduino (Adafruit Feather 32u4) with the same result (so it isn't my Arduino).

step one: comment out everything to do with the LED backback and see if it still gives 1023.

As I said, that's what I've already done. If I comment out just that one line, I get normal readings. If I leave that one line in, I get 1023.

I may have been too quick to say it wasn't a wiring problem. I also don't get the issue if I leave that line in the code and remove the led backpack from the breadboard. Perhaps the LED backpack is the issue. Maybe I messed up the soldering or maybe I got a bad board.

Ah, I missed that bit. My bad.

Can you post a photo of your breadboard setup?

Do I maybe need a resistor somewhere?

No, that all looks fine to me.

Does the supply voltage to the microphone and/or the microcontroller drop when the LEDs are on?

I found something similar https://esp32.com/viewtopic.php?t=2794

Does bending the micophone signal wire well away from the I2C wires make any difference?

You get 1023, what? The value of analogRead? The value of Peak-to-peak? I'd try using a different analog pin for the microphone. Also add a small delay after bar.writeDisplay();. Lastly; I'd try providing the microphone board with it's own power wires, instead of getting it from the bar-graph module.

Add up all the current needed to run your project. Double the number. That's the amperage you should use as a minimum for your power supply.  Guessing, say there are 24 LEDs at 3mA each. That's about 100mA?  Add another 50mA for the Arduino Uno and another 50mA for the microphone?  Totaled that's about 200mA?  So you're power supply should be rated for at least 1/2 Amp.  And you should double that if going through the analog Arduino regulator. BTW, USB power sources are only supposed to hand out 500mA. Beyond that they are allowed to drop voltage. That's a lot of guess work. Just try a big PS.

Since you cannot post a schematic I will take a SWAG and say you have two different hardware devices using the same pin for different reasons. I2C is a bus only and its associated pins cannot be used for anything else. Be sure the I2C bus is only connected to I2C terminals. Also be sure it is terminated properly.


text:
Does anyone know code for a filter that bypasses small vibrational movements in my accelerometer input data
So basically I have a DC motor that is self stabilizing a platform using an accelerometer as its input. When i hit the table, everything freaks out and the platform moves rapidly back and forth for a little bit. I would like to know if anyone has some sort of code that would filter this out.
Here is my code:
//Code for accelerometer controlling an encoded DC
#include <Encoder.h>
#include <Wire.h>
#include <MPU6050.h>
//#include <QueueArray.h>

//Class to read the encoder
Encoder myEnc(19,18);

//I2C address of the MPU-6050
const int MPU_addr=0x68;

const uint16_t t1_load = 0;

// Timer1 compare value:
// Clock frequency / Prescaler / Required frequency = Compare value
// 16 MHz          / 64        / 200 Hz              = 1250
const uint16_t t1_comp = 1250;

// Buffered data for sending/receiving to/from the ISR
volatile bool isr_flag = false;  //Used to flag when the ISR when triggered
volatile unsigned long isr_time = 0;  //Input updated by ISR
volatile byte isr_motor_direction; //Output calculated and updated in loop()
volatile byte isr_motor_speed = 0; // Output calculated and updated in loop()

//initializing the MPU6050 (accel/gyro input)
MPU6050 sensor;

//accerleromter in the y direction
int16_t AcY;
//not using
int16_t AcX, AcZ, GyX, GyY, GyZ, Tmp;

//new varible for mapping the accelerometer to degrees
int yAng;

//Variables to create PID method
int currentTheta;
float error;
int dt = 5;
long integral=0;
long deriv;
int previousError;

//accel on light, always want it at 0
int setpoint = 0;

//change speeds of the motor
#define MOTOR_SPEED_PIN    3
//change direction of the motor
#define MOTOR_DIRECTION_PIN   2
#define MOTOR_DIRECTION_CW    LOW
#define MOTOR_DIRECTION_CCW   HIGH

void setup()
{
  //Disable global interrupt
  cli();

  // Reset Timer1 Control Reg A
  TCCR1A = 0;

  // Set CTC mode
  TCCR1B &= ~(1 << WGM13);
  TCCR1B |= (1 << WGM12);

  // Set to prescalar of 64
  TCCR1B &= ~(1 << CS12);
  TCCR1B |= (1 << CS11);
  TCCR1B |= (1 << CS10);

  // Reset Timer1 and set compare value
  TCNT1 = t1_load;
  OCR1A = t1_comp;

  // Enable Timer1 compare interrupt
  TIMSK1 = (1 << OCIE1A);

  // Enable global interrupt
  sei();

  Wire.begin();
  Wire.beginTransmission(MPU_addr);
  Wire.write(0x6B);
  Wire.write(0);
  Wire.endTransmission(true);

  Serial.begin(9600);

  pinMode(MOTOR_SPEED_PIN, OUTPUT);
  pinMode(MOTOR_DIRECTION_PIN, OUTPUT);

  sensor.initialize();
}

void loop()
{
    //Begin critical section
    //

    cli();
    bool flag = isr_flag; //Copy the ISR flag
    isr_flag = false; //Reset the ISR flag
    sei();

    //
    //End critical section

    if (flag == true)
    {
      DebugMsgTime("PID algorithm begin");

      //Begin critical section
      //

      //Getting a copy of the data that has been modified by the ISR
      cli();
      unsigned long time = isr_time;
      sei();

      //
      //End critical section

      static unsigned long previous_time = 0;
      previous_time = time;

      //Wire reading

      Wire.beginTransmission(MPU_addr);
      Wire.write(0x3B);  // starting with register 0x3B (ACCEL_XOUT_H)
      Wire.endTransmission(false);
      Wire.requestFrom(MPU_addr,14,true);

      //reading each of the 6 axis's of the MPU6050 and the temp
      AcX=Wire.read()<<8|Wire.read();  // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)
      //Only using AcY
      AcY=Wire.read()<<8|Wire.read();  // 0x3D (ACCEL_YOUT_H) & 0x3E (ACCEL_YOUT_L)
      AcZ=Wire.read()<<8|Wire.read();  // 0x3F (ACCEL_ZOUT_H) & 0x40 (ACCEL_ZOUT_L)
      Tmp=Wire.read()<<8|Wire.read();  // 0x41 (TEMP_OUT_H) & 0x42 (TEMP_OUT_L)
      GyX=Wire.read()<<8|Wire.read();  // 0x43 (GYRO_XOUT_H) & 0x44 (GYRO_XOUT_L)
      GyY=Wire.read()<<8|Wire.read();  // 0x45 (GYRO_YOUT_H) & 0x46 (GYRO_YOUT_L)
      GyZ=Wire.read()<<8|Wire.read();

      //mapping AcY to yAng from accel units to degrees
      yAng = map(AcY, -17000, 17000, -90, 90);

      //Calculate motor parameters locally

      long pos = PID(yAng);
      byte motor_direction = pos > 0 ? MOTOR_DIRECTION_CW : MOTOR_DIRECTION_CCW; //make sure that this is correct
      pos = abs(pos);
      pos = constrain(pos, 0, 100);
      byte motor_speed = map(pos, 0, 100, 0, 220);

      Serial.print(yAng);
      Serial.print(",");
      //Begin Critical Section
      //

      // Update the ISR data ready for output at the next interrupt.
      // This keeps the outputs locked to each other and synchronised to the interrupt.
      cli();
      isr_motor_direction = motor_direction;
      isr_motor_speed = motor_speed;
      sei();

      //
      //End Critical Section

      DebugMsgTime("PID algorithm end");
    }
}

ISR(TIMER1_COMPA_vect)
{
  //Output
  digitalWrite(MOTOR_DIRECTION_PIN, isr_motor_direction);
  analogWrite(MOTOR_SPEED_PIN, isr_motor_speed);

  //Input
  isr_time = micros();
  isr_flag = true;
}

//PID loop to find error between setpoint and currentTheta
long PID(int currentTheta)
{
    error = setpoint - currentTheta;
    integral = integral + error*dt;
    deriv = (error-previousError)/dt;
    long output = 2.4 * error + .01 * integral + 3.3 * deriv; //2.4; .01, 3.3
    //Serial.print(output);
    //Serial.print(",");
    //Serial.println(isr_time);
    previousError = error;
    return output;
}

void DebugMsgTime(const char *msg)
{
  static unsigned long previous_time = 0;
  unsigned long time = micros();
  unsigned long delta_time = time - previous_time;
  previous_time = time;

  Serial.println(msg);
  Serial.println(time);
  Serial.println(delta_time);
}

The code below is in the setup()
 for (int i = 0; i < 10; i++)
  {
    queue.enqueue(0);
    queue2.enqueue(0);
  }

The code below is apart of the averaging that is in the loop
if (firstQueue)
    {
        queue.dequeue();
        queue.enqueue(yAng);

      for (int i = 0; i < 10; i++) // copy the queue over
      {
        tempVal = queue.peek();
        sum = sum + tempVal;
        queue2.enqueue(tempVal);
        queue.dequeue();
      }
        yAngAverage = sum / 10;
        float pos = PID(yAngAverage);
        setMotor(pos);
        yAngAverage = 0;//set average back to 0
        firstQueue = false;
    }
    else
    {
        queue2.dequeue();
        queue2.enqueue(yAng);
      for (int i = 0; i < 10; i++) // copy the queue over
      {
        tempVal = queue2.peek();
        sum = sum + tempVal;
        queue.enqueue(tempVal);
        queue2.dequeue();
      }
        yAngAverage = sum / 10;
        float pos = PID(yAngAverage);
        setMotor(pos);
        yAngAverage = 0;//set average back to 0
        firstQueue = true;
    }
  sum = 0;
  tempVal = 0;*/
  }

Basically it created two different queues and would switch between them averaging 10 numbers and using that as my new input value. Way too slow

try averaging the readings .... or read 5 times and discard highest and lowest

ill update my code so you can see my averaging code beneath it. It made it super duper slow. Like the code would barely work.

Without spending hours going through your code it appears the PID gain is to high. Also slow down the motor response. Be aware different motors will act different.