48 #define CHILD_ID_VIBRATION 0
49 #define VIBRATION_SENSOR_DIGITAL_PIN 3
52 uint32_t SLEEP_TIME = 10*1000;
56 float valVIBRATION =0.0;
57 float lastVIBRATION =0.0;
58 unsigned char state = 0;
60 MyMessage vibrationMsg(CHILD_ID_VIBRATION, V_LEVEL);
64 pinMode(VIBRATION_SENSOR_DIGITAL_PIN, INPUT);
65 attachInterrupt(digitalPinToInterrupt(VIBRATION_SENSOR_DIGITAL_PIN), blink,
67 pinMode(SensorLED, OUTPUT);
76 present(CHILD_ID_VIBRATION, S_VIBRATION);
83 send(vibrationMsg.
set(int16_t(state)));
85 digitalWrite(SensorLED,
HIGH);
88 digitalWrite(SensorLED,
LOW);