- Notifications
You must be signed in to change notification settings - Fork1
Enable Blynk support of Teensy boards, especially latest Teensy 4.0, using WiFi, Ethernet, BT/BLE and GSM/GPRS shield
License
khoih-prog/Blynk_Teensy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- Why do we need this Blynk_Teensy library
- Changelog
- Prerequisites
- Installation
- How to use
- Examples
- Sample code
- Troubleshooting
- Issues
- TO DO
- DONE
- Contributions and Thanks
- Contributing
- License
- Copyright
Why do we need thisBlynk_Teensy library
To enable Blynk support of Teensy boards, especially latest Teensy 4.1/4.0
Arduino IDE 1.8.19+
for Arduino.Blynk library 1.0.1+
..
Teensy core 1.56
for Teensy (4.1, 4.0, 3.6, 3.5, 3,2, 3.1, 3.0, LC) boards.
The suggested way to install is to:
The best way is to useArduino Library Manager
. Search forBlynk_Teensy
, then select / install the latest version. You can also use this link for more detailed instructions.
Then copyBlynkDetectDevice.h to folder ~/Arduino/libraries/Blynk/src/Blynk to overwrite the original fileBlynkDetectDevice.h
.
- Navigate toBlynk_Teensy page.
- Download the latest release
Blynk_Teensy-master.zip
. - Extract the zip file to
Blynk_Teensy-master
directory - Copy whole
Blynk_Teensy-master/src
folder to Arduino libraries' directory such as~/Arduino/libraries/
.
The file BlynkSimpleShieldEsp8266_Teensy.h must be placed in Blynk librariessrc
directory (normally~/Arduino/libraries/Blynk/src
).
Then copyBlynkDetectDevice.h to folder ~/Arduino/libraries/Blynk/src/Blynk to overwrite the original fileBlynkDetectDevice.h
. By doing this, the correct board type can be displayed correctly along with Blynk logo as follows:
___ __ __ / _ )/ /_ _____ / /__ / _ / / // / _ \/ '_/ /____/_/\_, /_//_/_/\_\ /___/ v0.6.1 on Teensy 4.1/4.0
not just unknown Arduino board type:
___ __ __ / _ )/ /_ _____ / /__ / _ / / // / _ \/ '_/ /____/_/\_, /_//_/_/\_\ /___/ v0.6.1 on Arduino
- InstallVS Code
- InstallPlatformIO
- InstallBlynk_Teensy library by usingLibrary Manager. Search forBlynk_Teensy inPlatform.io Author's Libraries
- Please visit documentation for the other options and examples atProject Configuration File
In your code, just replace
BlynkSimpleShieldEsp8266.h
withBlynkSimpleShieldEsp8266_Teensy.h
That's it.
/* Comment this out to disable prints and save space*/#defineBLYNK_PRINT Serial// You could use a spare Hardware Serial on boards that have it (like Mega)#defineHWSERIAL Serial2// Pin RX2 : 7, TX2 : 8 for Teensy 4.0#include<ESP8266_Lib.h>#include<BlynkSimpleShieldEsp8266_Teensy.h>String cloudBlynkServer ="account.duckdns.org";#defineBLYNK_SERVER_HARDWARE_PORT8080char auth[] ="your-token";#defineSSID_MAX_LEN32#definePASS_MAX_LEN64// Your WiFi credentials.char ssid[] ="ssid";char pass[] ="pass";#defineEspSerial Serial2//Serial2, Pin RX2 : 7, TX2 : 8// Your Teensy <-> ESP8266 baud rate:#defineESP8266_BAUD115200ESP8266wifi(&EspSerial);voidsetup() {// Debug console Serial.begin(115200);delay(1000); Serial.println("\nStart Teensy 4.0");// Set ESP8266 baud rate EspSerial.begin(ESP8266_BAUD);delay(10); Serial.println("Start Blynk"); Blynk.begin(auth, wifi, ssid, pass, cloudBlynkServer.c_str(), BLYNK_SERVER_HARDWARE_PORT);}voidloop(){ Blynk.run();}
and this is the terminal debug output when running the example
Start Teensy 4.0Start Blynk[1310] ___ __ __ / _ )/ /_ _____ / /__ / _ / / // / _ \/ '_/ /____/_/\_, /_//_/_/\_\ /___/ v0.6.1 on Teensy 4.0[1310] Connecting to HueNet1[7876] AT version:0.40.0.0(Aug 8 2015 14:45:58)SDK version:1.3.0Ai-Thinker Technology Co.,Ltd.Build:1.3.0.2 Sep 11 2015 11:48:04OK[15448] IP = 192.168.2.107+CIFSR:STAMAC,5c:cf:7f:66:05:d2[15448] Connected to WiFi[25601] Ready (ping: 14ms).
Submit issues to:Blynk_Teensy issues
- Same features for other shields such as WiFi, Ethernet, BT/BLE, GSM/GPRS.
- Basic support for Teensy
Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell other people about this library
- The library is licensed underMIT
Copyright 2020- Khoi Hoang
About
Enable Blynk support of Teensy boards, especially latest Teensy 4.0, using WiFi, Ethernet, BT/BLE and GSM/GPRS shield