blynkkk / blynk-library

Blynk library for IoT boards. Works with Arduino, ESP32, ESP8266, Raspberry Pi, Particle, ARM Mbed, etc.
https://blynk.io
MIT License
3.81k stars 1.38k forks source link

for arduino core running on the embedded Linux #465

Closed hhk7734 closed 2 years ago

hhk7734 commented 5 years ago

Description

I made odroid-series arduino core. I want to write blynk code on the Arduino platform even if on the embedded Linux.

Issues Resolved

Until now, for using blynk, the code with blynk was compiled using command line tools on the embedded Linux.

If you merge BlynkSimpleLinuxSocket.h, to use blynk is much easier on the embedded Linux with Arduino.

vshymanskyy commented 4 years ago

Could you please also provide a sensible example for the board that that you're using here? Is it odroid?

hhk7734 commented 4 years ago

Could you please also provide a sensible example for the board that that you're using here? Is it odroid?

https://github.com/hhk7734/oduino

#include <BlynkSimpleLinuxSocket.h>

const char *_auth = "";
const int LED_PIN = 24;

BLYNK_WRITE( V1 )
{
    int temp = param.asInt();
    digitalWrite(LED_PIN, temp);
    Serial.print("LED: ");
    Serial.println( temp == 0 ? "OFF" : "ON" ); 
}

void setup()
{
    Serial.begin( 9600 );
    Blynk.begin( _auth );

    pinMode( LED_PIN, OUTPUT );
}

void loop()
{
    Blynk.run();
}