Hi
Im currently having some problems with programming a solution for a small system that im making.
The idea is a mailbox with a dongle and accelerometer that senses movement, if any turn on infrared to see if anything change from "empty state". If change, send pulse to a "central" inside with another dongle connected to arduino + LCD.
The reason that infrared is off most of the time is that the system is powered by solar so to save energy im turning it on with movement.
I have completed code for arduino,
Schematic for the mailbox (the resistors on the right is just for testing since the battery bank has an internal currentmeter so to test we had to use more amps) :
Schematic for central inside.
I've tried to use blinky as a starting learning reference since I could find a youtube video about it. But as far as implementing accelerometer and infrared im having problems.
I am using VScode + makefile.
Is there any examples that may be better suited for this project? Im not experienced with coding for embed, only done a few arduido projects in the past.
Any help would be greatly appreciated