He has a small company for cutting trees and they have many chargers for their devices.
So in the winter when it gets cold he wants charge the batteries after use.
The idea is to put a batterie in the heated cabinet push a button (with a led for feedback) and if the outside temperature (measured by the ds1820) is below a given value wait a given time before turning the charger on so that the batterie can get warm before charging. And on the next day you have a heated batterie wich can operate unter full load.
My question regarding my "schematic":
- Can i daisy chain the devices this way (what do I have to consider?)? Especially three PCA9685? If so how would i address them individually.
Pseudocode (how do i get the # of the gpio of the pushbutton as an eventvalue...this would make the rules much smaller):
Code: Select all
On PCA#2,gpio#1 = 1 do // when pushbutton on the first gpio is pressed
PCA#3,<gpio of PCA#2>,1 //switch on the corresponding led
if [ds1820#temperature] < 5
timerset,<gpio of PCA#2>,1800
else
PCA#1,<gpio of PCA#2>,1 //if it is not too cold switch the charger on immediately
endif
endon
on Rules#Timer=1 do
PCA#1,<gpio of PCA#2>,1 //turn on the charger after half an hour
endon
- Are there any better choices hardwarewise?