Hello.
I have Raspberry 3 ad Blynk library for C.
All run correctly, I can read vitualPin, widget etc but when I used digitalWrite function, I get an error.
Please find below my main.cpp and the errors
Porque no hay nada en Español de este tema (blynk library). Somos mas de 300 millones y no hay ni una sola web. hay que hacer algo.
Main.cpp
#define BLYNK_PRINT stdout
#ifdef RASPBERRY
#include <BlynkApiWiringPi.h>
#else
#include <BlynkApiLinux.h>
#endif
#include <BlynkSocket.h>
#include <BlynkOptionsParser.h>
static BlynkTransportSocket _blynkTransport;
BlynkSocket Blynk(_blynkTransport);
#include <BlynkWidgets.h>
BLYNK_WRITE(V1)
{
printf("Got a value: %s\n", param[0].asStr());
Blynk.virtualWrite(V0,1);
digitalWrite(17,1);
}
void setup()
{
}
void loop()
{
Blynk.run();
}
int main(int argc, char* argv[])
{
const char *auth, *serv;
uint16_t port;
parse_options(argc, argv, auth, serv, port);
Blynk.begin(auth, serv, port);
setup();
while(true) {
loop();
}
return 0;
}
The compilation error executed with clean all target=raspberry I am using the last library version 0.8…4
main.cpp:29:20: error: ‘digitalWrite’ was not declared in this scope
digitalWrite(17,1);
^
.
Many thanks for your help