New answers tagged

0

It looks like you're trying to measure the resistance of soil by connecting an ADC input through the soil to VCC. That is not the way to to it. At the moment you effectively have this schematic for that portion: simulate this circuit – Schematic created using CircuitLab The voltage dropped across the soil is proportional to the current flowing ...


0

You could easily set the LED output LOW just before you call going_to_sleep(), and set it HIGH when going_to_sleep() returns. There would be two short periods where the LED signal would indicate sleeping but the processor is running: between the LED going LOW and the processor actually entering sleep; and between the processor waking and the LED going HIGH. ...


2

The IO doesn't require the clock to keep its current state. It only requires it to change state. There is no real external signal provided by the chip to indicate if its in sleep mode or not. However you could monitor the current consumption of the chip and when it drops below a certain threshold you can assume that it is in sleep mode.


0

Either set the watchdog to 8s, and setup the WDT interrupt. And deal with the fact that the MCU wakes up every 8s. You could have it go back to sleep, unless a button is pressed, or something. The extra power usage for these short wakeups is negligible in most cases. Or disable the watchdog right before sleeping, and enable right after waking up. And hope ...


0

When you sleep the Arduino is locked up. So yes, the watchdog timer will time out and reset the Arduino. But, since you're in sleep mode, it's not so much a "reboot" as a "wakeup". The watchdog timer is one of the normal ways of waking up periodically to do things. If you want to use the watchdog for its other "anti-lockup" purpose then you will have to ...


3

Not really a physics question, but I will answer anyway. loop() is the standard Arduino function which contains code that the microprocessor runs repeatedly (as opposed to code in setup() which is only run once). light = analogRead(5); takes an analogue voltage reading from pin 5, encodes it as an integer value (either 10 or 12 bits depending on the ...


1

The main problem is, that the module does not get any supply voltage. You connected the Unos 5V to the OLED boards 5V. But this pin doesn't seem to be connected on the OLED shield. It is marked with 5V there, because this board is a shield to be stacked onto the Wemos D1. When you do this, you have 5V on this pin from the Wemos and can access it on the OLED ...


Top 50 recent answers are included