Creating an IoT platform for smart agriculture. Collecting data and sending them to thingspeak for analysis

Dependencies:   DHT11 LPS22HB LSM6DSL VL53L0X

Committer:
kaoriw
Date:
Fri Jun 08 12:16:19 2018 +0000
Revision:
1:469ea8167b80
Parent:
0:07ff689741d2
Uncomplete

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kaoriw 0:07ff689741d2 1 #include "CANbus.h"
kaoriw 0:07ff689741d2 2
kaoriw 0:07ff689741d2 3 #ifndef MBED_H
kaoriw 0:07ff689741d2 4 #define MBED_H
kaoriw 0:07ff689741d2 5 #include "mbed.h"
kaoriw 0:07ff689741d2 6 #endif
kaoriw 0:07ff689741d2 7
kaoriw 0:07ff689741d2 8 struct VMS_Msg1 data_pack(int* data)
kaoriw 0:07ff689741d2 9 {
kaoriw 0:07ff689741d2 10
kaoriw 0:07ff689741d2 11 }
kaoriw 0:07ff689741d2 12
kaoriw 0:07ff689741d2 13 void data_parse(struct VMS_Msg1 packed_data)
kaoriw 0:07ff689741d2 14 {
kaoriw 0:07ff689741d2 15 battery_current = packed_data.battery_current;
kaoriw 0:07ff689741d2 16 battery_voltage = packed_data.battery_voltage;
kaoriw 0:07ff689741d2 17 Bat_SOC = packed_data.Bat_SOC;
kaoriw 0:07ff689741d2 18 speed = packed_data.speed;
kaoriw 0:07ff689741d2 19 motorTemperature = packed_data.motorTemperature;
kaoriw 0:07ff689741d2 20 }