Hi! I have years of experiences with Arduino products. When I switched over from Arduino to the raspberry pi, I was using node js as a quick replacement. I never really used Python so I the simplest solution for my projects was the C programming language. I found some documentation on the internet how to integrate Blynk into node js file and start it from there. But I have no idea how to do that in C language… I already downloaded Blynk and WiringPi library and tested the library with:
sudo ./blynk --token=
It works without any problems. How can I include Blynk in the .c file? Can anyone give me some sample code? I can write further code. My current code in C(i’m still trying how things work in C):
#include <wiringPi.h>
#include <stdio.h>
const int light = 26;
const int doors = 23;
const int dht22 = 4;
const int led = 17;
int main(void)
{
wiringPiSetupGpio();
pinMode(light, OUTPUT);
pinMode(doors, INPUT);
pinMode(dht22, INPUT);
pinMode(led, OUTPUT);
while(1){
printf("Turned on...");
digitalWrite(led, HIGH);
delay(2000);
printf("Turned off...");
digitalWrite(led, LOW);
delay(2000);
}
return 0;
}