Howto for Raspberry Pi

Hi,
Why can’t whitespace be filtered out? It seems like a simple thing to do.

@electronicsguy

Already done. But will be available only after new server deploy. That is not soon I believe.

hey there guys
I have a little problem with a Raspberry pi well I can’t get it to work at all, all I get after I follow all the steps as mention here is this:

pi@raspberrypi ~/blynk-library/linux $ sudo ./blynk --token=MY TOKEN GOES HERE
[0] Blynk v0.2.2-beta
[1] Connecting to cloud.blynk.cc:8442
pi@raspberrypi ~/blynk-library/linux $

Have never gotten to work not eve to test your app guys I have 3 Raspberry pi modules ,Version B, B+ and the new Pi 2 and that is all I get on my screen when I do what you guys say.

WiringPi is installed ,I did all it says in this webpage with no luck at all, can someone tell me what else I need to do please

thank you all

Could you please try if telnet cloud.blynk.cc 8442 connects?

Finally got it to work ,I have to rewrite the NOOBS image into the SD card again,I even did the " sudo apt-get update" & “sudo apt-get upgrade” but didn’t work out,after the reinstall It is working great on all my Pi’s .

1 Like

sudo: ./blynk: command not found

I get the above error after running the below:

pi@raspberrypi ~/blynk-library/linux $ sudo ./blynk --token=076ebca40d8648b681

what am I doing wrong?

Thanks

Well this means you haven’t actually built the Blynk (or some error happened during build).
I don’t know how it happened (not enough information is provided).
Try using our build script: sh build.sh

I have built the script multiple times. Even started over with a different SD card loading Raspbian from scratch. Follow instructions and get the same error at the same point.

Here is the entire transaction:

pi@raspberrypi ~ $ git clone https://github.com/blynkkk/blynk-library.git
Cloning into ‘blynk-library’…
remote: Counting objects: 2832, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 2832 (delta 0), reused 0 (delta 0), pack-reused 2828
Receiving objects: 100% (2832/2832), 494.34 KiB, done.
Resolving deltas: 100% (1674/1674), done.
pi@raspberrypi ~ $ cd blynk-library/linux
pi@raspberrypi ~/blynk-library/linux $ make clean all target=raspberry
rm main.o BlynkDebug.o …/utility/BlynkHandlers.o blynk
rm: cannot remove main.o': No such file or directory rm: cannot removeBlynkDebug.o’: No such file or directory
rm: cannot remove ../utility/BlynkHandlers.o': No such file or directory rm: cannot removeblynk’: No such file or directory
Makefile:62: recipe for target ‘clean’ failed
make: [clean] Error 1 (ignored)
g++ -I …/ -I ./ -DLINUX -c -O3 -w -DRASPBERRY main.cpp -o main.o
In file included from ./BlynkSocket.h:25:0,
from main.cpp:17:
…/Blynk/BlynkProtocol.h: In member function ‘bool BlynkProtocol::connect(uint32_t)’:
…/Blynk/BlynkProtocol.h:55:13: error: there are no arguments to ‘yield’ that depend on a template parameter, so a declaration of ‘yield’ must be available [-fpermissive]
…/Blynk/BlynkProtocol.h:55:13: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Makefile:68: recipe for target ‘main.o’ failed
make: *** [main.o] Error 1
pi@raspberrypi ~/blynk-library/linux $ sh build.sh raspberry
Hit http://archive.raspberrypi.org wheezy Release.gpg
Hit http://raspberrypi.collabora.com wheezy Release.gpg
Hit http://mirrordirector.raspbian.org wheezy Release.gpg
Hit http://archive.raspberrypi.org wheezy Release
Hit http://mirrordirector.raspbian.org wheezy Release
Hit http://raspberrypi.collabora.com wheezy Release
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/main armhf Packages
Hit http://raspberrypi.collabora.com wheezy/rpi armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en_GB
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists… Done
Building dependency tree
Reading state information… Done
build-essential is already the newest version.
git-core is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Cloning into ‘wiringPi’…
remote: Counting objects: 742, done.
remote: Compressing objects: 100% (676/676), done.
remote: Total 742 (delta 537), reused 95 (delta 58)
Receiving objects: 100% (742/742), 264.40 KiB | 469 KiB/s, done.
Resolving deltas: 100% (537/537), done.
Already up-to-date.
wiringPi Build script

WiringPi Library
[UnInstall]
[Compile] wiringPi.c
[Compile] wiringSerial.c
[Compile] wiringShift.c
[Compile] piThread.c
[Compile] piHiPri.c
[Compile] wiringPiSPI.c
[Compile] wiringPiI2C.c
[Compile] softPwm.c
[Compile] softTone.c
[Compile] mcp23008.c
[Compile] mcp23016.c
[Compile] mcp23017.c
[Compile] mcp23s08.c
[Compile] mcp23s17.c
[Compile] sr595.c
[Compile] pcf8574.c
[Compile] pcf8591.c
[Compile] mcp3002.c
[Compile] mcp3004.c
[Compile] mcp4802.c
[Compile] mcp3422.c
[Compile] max31855.c
[Compile] max5322.c
[Compile] sn3218.c
[Compile] drcSerial.c
[Compile] wpiExtensions.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]

WiringPi Devices Library
[UnInstall]
[Compile] ds1302.c
[Compile] maxdetect.c
[Compile] piNes.c
[Compile] piFace.c
[Compile] gertboard.c
[Compile] lcd128x64.c
[Compile] lcd.c
[Compile] piGlow.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]

GPIO Utility
[Compile] gpio.c
[Compile] readall.c
[Compile] pins.c
[Link]
[Install]

All Done.

NOTE: To compile programs with wiringPi, you need to add:
-lwiringPi
to your compile line(s) To use the Gertboard, MaxDetect, etc.
code (the devLib), you need to also add:
-lwiringPiDev
to your compile line(s).

gpio version: 2.26
Copyright © 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
Type: Model 2, Revision: 1.1, Memory: 1024MB, Maker: Sony
rm main.o BlynkDebug.o …/utility/BlynkHandlers.o blynk
rm: cannot remove main.o': No such file or directory rm: cannot removeBlynkDebug.o’: No such file or directory
rm: cannot remove ../utility/BlynkHandlers.o': No such file or directory rm: cannot removeblynk’: No such file or directory
Makefile:62: recipe for target ‘clean’ failed
make: [clean] Error 1 (ignored)
g++ -I …/ -I ./ -DLINUX -c -O3 -w -DRASPBERRY main.cpp -o main.o
In file included from ./BlynkSocket.h:25:0,
from main.cpp:17:
…/Blynk/BlynkProtocol.h: In member function ‘bool BlynkProtocol::connect(uint32_t)’:
…/Blynk/BlynkProtocol.h:55:13: error: there are no arguments to ‘yield’ that depend on a template parameter, so a declaration of ‘yield’ must be available [-fpermissive]
…/Blynk/BlynkProtocol.h:55:13: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Makefile:68: recipe for target ‘main.o’ failed
make: *** [main.o] Error 1
pi@raspberrypi ~/blynk-library/linux $ sudo ./blynk --token=076ebca40d8648b681a7656b6e77f5c0
sudo: ./blynk: command not found
pi@raspberrypi ~/blynk-library/linux $

I have exactly the same problem like TRBOGURU in his previous post (regarding the whole git clone and compilation process) on my RPI2.

I use raspberry v2
i always got error when i make clean all target=raspberry,
Please help… :sob:

root@Bel-Digitalv2:~/blynk/blynk-library/linux# make clean all target=raspberry
rm main.o BlynkDebug.o …/utility/BlynkHandlers.o blynk
rm: tidak dapat menghapus main.o': Tidak ada berkas atau direktori seperti itu rm: tidak dapat menghapusBlynkDebug.o’: Tidak ada berkas atau direktori seperti itu
rm: tidak dapat menghapus ../utility/BlynkHandlers.o': Tidak ada berkas atau direktori seperti itu rm: tidak dapat menghapusblynk’: Tidak ada berkas atau direktori seperti itu
Makefile:62: recipe for target ‘clean’ failed
make: [clean] Error 1 (ignored)
g++ -I …/ -I ./ -DLINUX -c -O3 -w -DRASPBERRY main.cpp -o main.o
In file included from ./BlynkSocket.h:25:0,
from main.cpp:17:
…/Blynk/BlynkProtocol.h: In member function ‘bool BlynkProtocol::connect(uint32_t)’:
…/Blynk/BlynkProtocol.h:55:13: error: there are no arguments to ‘yield’ that depend on a template parameter, so a declaration of ‘yield’ must be available [-fpermissive]
…/Blynk/BlynkProtocol.h:55:13: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Makefile:68: recipe for target ‘main.o’ failed
make: *** [main.o] Error 1
root@Bel-Digitalv2:~/blynk/blynk-library/linux#

yes i have some trouble error like, until now have you solve this problem ?

I fixed it with editing blynk-library/linux/Makefile:

ifeq ($(target),raspberry)
        CFLAGS += -DRASPBERRY -fpermissive
        LDFLAGS += -lwiringPi
endif

Make sure you add -fpermissive in CFLAGS variable
Explanation here: http://stackoverflow.com/questions/8843818/what-does-the-fpermissive-flag-do

Okee thank you, It work

I do everything correctly as you have been writing that , but I can not connected to my Blynk app

pi@raspberrypi ~/wiringPi/blynk-library/linux $ sudo ./blynk --token=9e78d341e8c44b4995b99a05589fb956
[1] Blynk v0.2.5-beta
[5001] Connecting to cloud.blynk.cc:8442
[5280] Ready (ping: 116ms).

But it says that it’s ready…

But The Raspberry in my app is still Offline ?

Please check your token correctly copied and corresponds to your dashboard token.

I have also a problem with the connection to the pi 2… It works for around 5 seconds (in this time i can controll the connected relays) and then it disconnects!? How can i fix this?

Same Problem here with Raspbian, Android 5.0