Blynk basics - client parameters and making sketch on RPi3 (WireingPi)

Just getting started and can’t understand some basics of Blynk

Installed server and client on RPi3 with Raspbian, server works

Starting client with: “blynk-client TOKEN” auto connect to, tried --host --port 9443 still connecting to cloud, what is correct parameter?

And sketches, can’t understand how it works on RPi3, where is sketch file located? how to activate sketch?


Installed blynk-client now it’s working with my server, needed to use “git clone” method which was missed in some tutorial

Where should I put sketches and how to activate? in tutorial they jump to editing part but where the file located and how to start?

you can specify the server address in the node.js (or whatever you named the java script file) like this

var blynk = new Blynk.Blynk(AUTH, options = {
  connector : new Blynk.TcpClient( options = { addr:"your_ip", port:your_port} )

Depends entirely on the type of RPi based Blynk Client you install… there is:

None of which I am aware of needing a “git clone” method??? What did you install?

For Local Server, you need to use various methods for forcing the IP and port from the default cloud…

  • WiringPi: I can’t remember, but I believe a library file also needed to be adjusted.
    EDIT - sudo ./blynk --port=8080 --token=xxxxxxx

  • NodeJS is modified in the Client sketch as already listed above.

  • Python needs to be adjusted in the file (you may have to run a search for it on your RPi)… see here

1 Like

Thank you for direction, actually “git clone” method posted by you :slight_smile: there are tons of different tutorials and all of them different with different result, so hard for a noob like me

Eventually I succeeded running server and client, but not succeeded with sketches: GPIO pins did work I could turn LED from it, but couldn’t communicate with virtual pins

When edited file main.cpp and restart client nothing happened like it was ignoring this file, default lines were to show input of virtual pin 1 (V1), but when I changed this to V0 it still showed V1 input in console, did search file system for another main.cpp but was not found, so where it taking sketch from if not main.cpp?

Oh wow… that was a long time ago :stuck_out_tongue: I totally forgot.

Yes my first foray with the RPi was WiringPi. I gave up on it and now use NodeJS and Python instead. Node JS seems so difficult then, but it is actually fairly easy… and very quick to edit/test sketches. Python is very quick as well… make it easier to learn both new languages through trial & error.

So unfortunately I can’t really assist as I have no idea how to properly get WiringPi to work with Blynk… if memory serves me correctly, mainly due to the same reason you are running into. It seemed so complicated to get a simple sketch edited and tested each time.

After all yesterday’s fails I deleted everything to start fresh today

I’ll try NodeJS or Python, hopefully I can make up to date and noob-friendly tutorial

1 Like