I have been assigned to set up these fish autofeeders that have been assembled . The goal is to have the autofeeders installed on top of the fish tank and dispensing food at chosen times (so somehow retrieving information about global timing).
I need to program and install 15 such systems. I also have access to 1 Raspberry pi (which I think will help with keeping clock time? I am not sure).
A NodeMCU board is attached to a custom PCB. It seems through the PCB the servo (which controls and rotates the feeder to allow food to drop) is connected to the board's D4 pin. An LED also seems to be connected to the D5 pin (not sure what this can be used for, maybe showing that the system is active or food is being dispensed something of that sort).
This connection goes through a resistor on the PCB (labeled 1k). There also seems to be a small battery or something connected via the PCB (I think it is connected to VIN and has a label of 70uF, so might be a capacitor instead).
According to online sources I cannot retrieve the program that was uploaded onto the board when they were used before, so I need to code the program from scratch and I have no idea how to start.
I tried to upload the example blink sketch, changing the LED pin to D5 but nothing happened.
Any and all guidance on how to proceed would be really really appreciated. If any more information about the system/pictures are needed I'll be happy to add on too.
/*
ESP8266 Blink by Simon Peter
Blink the blue LED on the ESP-01 module
This example code is in the public domain
The blue LED on the ESP-01 module is connected to GPIO1
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/
const int LED_Pin = D5;
void setup() {
pinMode(LED_Pin, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_Pin, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is active low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(LED_Pin, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}
D5
to14
(as D5 should be GPIO14).