Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bcfeeff7f | ||
|
|
728873e0f2 |
@@ -12,6 +12,7 @@
|
||||
platform = atmelavr
|
||||
board = pro8MHzatmega328
|
||||
framework = arduino
|
||||
upload_protocol = arduino
|
||||
monitor_speed = 115200
|
||||
lib_deps =
|
||||
mysensors/MySensors@^2.3.2
|
||||
@@ -22,6 +23,7 @@ lib_deps =
|
||||
platform = atmelavr
|
||||
board = nanoatmega328new
|
||||
framework = arduino
|
||||
upload_protocol = arduino
|
||||
monitor_speed = 115200
|
||||
lib_deps =
|
||||
mysensors/MySensors@^2.3.2
|
||||
|
||||
1862
src/SecurityPersonalizer.ino.txt
Normal file
1862
src/SecurityPersonalizer.ino.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,10 @@
|
||||
|
||||
#define MY_RADIO_RF24
|
||||
#define MY_DEBUG
|
||||
#define MY_DEBUG_VERBOSE_SIGNING
|
||||
#define MY_SIGNING_SOFT
|
||||
#define MY_SIGNING_REQUEST_SIGNATURES
|
||||
#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
|
||||
|
||||
#ifdef NANO
|
||||
#define MY_RF24_CE_PIN 10
|
||||
@@ -79,7 +83,7 @@ void presentation()
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
|
||||
|
||||
#ifdef NANO
|
||||
pinMode(RLY_PIN, OUTPUT);
|
||||
pinMode(SW1_PIN, INPUT_PULLUP); // siempre a HIGH a menos que se pulse
|
||||
@@ -132,6 +136,7 @@ void loop()
|
||||
int batteryPercent = static_cast<int>(100.0 * (voltageV - VccMin) / (VccMax - VccMin));
|
||||
batteryPercent = constrain(batteryPercent, 0, 100);
|
||||
|
||||
send(ch_comm_vcc.set(voltageV, 2));
|
||||
sendBatteryLevel(batteryPercent); // función de MySensor que envía el procentaje
|
||||
|
||||
wait(2000);
|
||||
|
||||
Reference in New Issue
Block a user