Open witchole opened 6 years ago
I'm trying to assemble the Reminder V2 with 4 bottoms but from the video it is not very clear the full billd schematic (how the interrupts and leds connect to the Wemos D1 Mini Pin by pin). Can anyone help with a full build schematic? Thank you very much in advance.
Hi kodacy, I don't have a schematic, but the circuit is very simple.
Switches:
Connect 1 leg of each switch to pin A0
Build a ladder of 10k resistors between GND and 3.3V, connecting the 2nd leg of each switch to the corresponding point of the ladder.
LEDs:
Connect all cathodes to GND
Wire a 100 ohm resistor between anode and the relevant GPIO pin on the Wemos.
edit: That is for the "analog" version, that can have up to 8 switches. If you're building the version with proper interrupts, simply wire up each switch between GND and whatever GPIO pin you specify in the source code.
I just compiled ReminderV2 and ReminderAnalog with IDE 1.8.12 and ESP8266 2.6.3 on Windows10 and did not get errors
Will try again tonight, and will feedback.
Sorry for talking so long to reply, but still no luck: using Windows 10 IDE 1.8.13 and ESP8266 2.6.3 on Windows10
Always getting:
Reminder_Analog.ino: In function 'void setup()': Reminder_Analog:289:11: error: 'D0' was not declared in this scope pinMode(D0, OUTPUT); ^ exit status 1 'D0' was not declared in this scope
Reminder_Analog.ino: In function 'void setup()': Reminder_Analog:289:11: error: 'D0' was not declared in this scope
Hi @kodacy, this page is for Reminder_AnalogV2.ino, not Reminder_Analog.ino.
D0 is defined in pins_arduino.h
Attached version of Reminder_Analog has the following improvements:
https://github.com/electronicsguy/ESP8266/tree/master/HTTPSRedirect
(when user presses a button to create a new task, but before the task has been created in GCal).
This new status makes the code simpler in manageStatus().
Records the status in permanent memory, so the device can be switched off temporarily and it will remember whether the task has been completed.
User-defined constant to configure delay before writing to permanent memory
This is useful to save writing unnecessarily, for example in the common situation where someone presses a button to activate a task, then immediately presses again to cancel (either when demonstrating the device, or to correct a mistake).
Without the delay will result in 2 (wasted) write-cycles, whereas with the delay there will be no write at all.
(previous version did not respond in this situation).
(useful to illustrate leaking memory problem with v2.4.1 of the ESP8266 library)
(distracting otherwise when no tasks are currently due).
(I don't use D4 for that reason).
User-defined constant to configure the Hearbeat frequency (set to zero to disable Hearbeat altogether)
User-defined constant to configure the frequency of status printing.
Future enhancement:
It would be nice to do away with the current polling solution using a Ticker object. Is it possible to use a proper hardware interrupt to signal when to read the analog pin (A0) - e.g. by connecting the switches to another input pin as well as A0?
At the moment, if someone presses a button while the calendar is being accessed, there can be a delay before the LED status changes, and the key press is occasionally not registered at all.
Reminder_AnalogV2.zip