17 pinMode(DIGITAL4 ,INPUT);
18 pinMode(DIGITAL5 ,INPUT);
19 pinMode(DIGITAL6 ,OUTPUT);
52 Utils.setLED(LED0, LED_OFF);
53 Utils.setLED(LED1, LED_OFF);
54 PWR.deepSleep(
"00:00:01:00",RTC_OFFSET,RTC_ALM1_MODE1,SOCKET0_OFF);
55 if( intFlag & RTC_INT ){
56 intFlag &= ~(RTC_INT);
70 uint8_t days = time / (60 * 60 * 24);
71 time -= days * (60 * 60 * 24);
72 uint8_t hours = time / (60 * 60);
73 time -= hours * (60 * 60);
74 uint8_t minutes = time / 60;
97 digitalWrite(DIGITAL6, HIGH);
99 level=PWR.getBatteryLevel();
100 digitalWrite(DIGITAL6, LOW);
110 USB.println(
"runstate = measure");
132 USB.println(
"runstate = sleep");
139 USB.println(
"runstate = wakeUP");
uint8_t sendData(Sensors::structSensors *sensors)
This method sends all the sensor information from the struct to the webserver.
void BlinkAkku(uint8_t batLevel)
This method sets the button led on or in blink state for 5 seconds (depending on battery level) (bloc...
void printAll()
This method reads all the sensors and prints them to the serial Port.
uint8_t makeMeasurment(void)
void wakeUp()
This method is used to wake up the Sensors, it initializes them.
void init()
This method initializes the output pins for the leds and clears both led.
void convertTime(uint32_t time)
uint8_t getSensorValues(Sensors::structSensors *allSensors)
This method reads the pitch and Roll Angle- Values of all 3 Accelerometers, all 3 temperatures and th...
void goToSleep()
This method sets all sensors in Standby.
uint8_t sendToServer(Sensors::structSensors *dataToSend)
void init()
This method initializes the operator parameters that are necessary for 3G connection.
Class that handles the communication over 3G.
uint8_t measureBattery(void)
Sensors::structSensors mySensorStruct
Class that handles sensors.
void init()
This method initializes the sensors.