Here is a project to read the LinkIt One's battery voltage through Blynk.
Step 1: CodeDon't know how to code the LinkIt One board? Click here. Here is the code I made:
//Code Created By FunguyPro www.funguypro.tk
#define ARDUINO 150 //#define BLYNK_PRINT Serial //Uncomment for Serial Data
#include #include #include #include #include
int i = 0;
SimpleTimer timer;
// You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "YOURAUTHCODE";
#define WIFI_SSID "YOURSSID" // Your network SSID (name) #define WIFI_PASS "YOURPASS" // Your network password (use for WPA, or use as key for WEP) #define WIFI_AUTH LWIFI_WPA // choose from LWIFI_OPEN, LWIFI_WPA, or LWIFI_WEP
void setup() { Serial.begin(9600); Blynk.begin(auth, WIFI_SSID, WIFI_PASS, WIFI_AUTH); delay(500); }
void loop() { Blynk.run(); i++; if(i == 1000){ int batt = LBattery.level(); Blynk.virtualWrite(V5, batt); i = 0; } delay(1); }
Step 2: Connect BlynkDon't know how to connect Blynk? Click here.
Step 3: Need Help?Click here.
Comments