HELTEC WIFI 32 module is an ultra-performance that is high ultra-low-power consumption Wi-Fi and Bluetooth wireless platform based on ESPRESSIF ESP32 chipset. ESP-32S dual-core 448 KByte ROM | 520 KByte SRAM | 16 KByte SRAM in RTC | 802.11 b/g/n/e/I Wi-Fi | Bluetooth v4.2 BR | EDR & BLE | clocks & Times |peripheral Interfaces and security mechanism.
ESP-32 Wifi Bluetooth combo module provides SDK Firmware for fast programming that is on-line open source toolchains based on GCC for development support. It is designed for Generic power that is low sensor hub, loggers, video steaming for camera, Wi-Fi & Bluetooth enabled devices, Home automation and mesh network applications, aimed at makers, hardware engineers, software engineers and solution provides. ESP32 is a chip that is a single GHz Wi-Fi and Bluetooth combo chip designed with TSMC ultra-low-power 40 nm technology. It is designed and optimized for the powerful performance that is best, RF performance, robustness, versatility, features, and reliability, for a wide variety of applications, and different power profiles.
HELTEC WIFI 8 is driven by ESP8266 SOC chip, ESP8 module has a preprogrammed firmware which supports the serial interface communication by controlling using AT commands. The ESP8266 chip was developed by ESPRESSIF System, a smart connectivity platform or ESCP that provides high performance, high integration wireless SOCs, the chip designed for space and power-constrained mobile platform. The ESP8266 provides unsurpassed ability to embed Wifi capabilities within another system, or to the application, and minimal space requirement.
Integration
WIFI32 Pinout Diagram
WIFI8 Pinout Diagram
HELTEC WIFI32 / ESP32 Factory Test Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
#include "Arduino.h" #include "heltec.h" #include "WiFi.h" #define BAND 868E6 //you can set band here directly,e.g. 868E6,915E6 uint64_t chipid; bool IsACKRecvied = false; String rssi = "RSSI --"; String packSize = "--"; String packet; unsigned int counter = 0; void WIFISetUp(void) { // Set WiFi to station mode and disconnect from an AP if it was previously connected WiFi.disconnect(true); delay(1000); WiFi.mode(WIFI_STA); WiFi.setAutoConnect(true); WiFi.begin("Your WiFi SSID","Your Password");//fill in "Your WiFi SSID","Your Password" delay(100); byte count = 0; Serial.print("Connecting."); while(WiFi.status() != WL_CONNECTED && count < 5) { count ++; Serial.print("."); delay(500); } if(WiFi.status() == WL_CONNECTED) { Serial.println("\r\nConnecting...OK."); } else { Serial.println("Connecting...Failed"); //while(1); } Serial.println("WIFI Setup done"); } void WIFIScan(unsigned int value) { unsigned int i; if(WiFi.status() != WL_CONNECTED) { WiFi.mode(WIFI_MODE_NULL); } for(i=0;i<value;i++) { Serial.println("Scan start..."); int n = WiFi.scanNetworks(); Serial.println("Scan done"); delay(500); if (n == 0) { Serial.println("no network found"); //while(1); } else { Serial.print(n); Serial.println("networks found:"); delay(500); for (int i = 0; i < n; ++i) { // Print SSID and RSSI for each network found Serial.print((i + 1)); Serial.print(":"); Serial.print((String)(WiFi.SSID(i))); Serial.print(" ("); Serial.print((String)(WiFi.RSSI(i))); Serial.println(")");; delay(10); } } delay(800); } } bool receiveflag = false; bool resendflag=false; bool deepsleepflag=false; void interrupt_GPIO0() { delay(10); if(digitalRead(0)==0) { if(digitalRead(LED)==LOW) {resendflag=true;} else { deepsleepflag=true; } } } void setup() { pinMode(LED,OUTPUT); Heltec.begin(true /*DisplayEnable Enable*/, true /*LoRa Disable*/, true /*Serial Enable*/, true /*PABOOST Enable*/, BAND /**/); WIFISetUp(); WIFIScan(1); attachInterrupt(0,interrupt_GPIO0,FALLING); LoRa.onReceive(onReceive); send(); LoRa.receive(); } void loop() { if(deepsleepflag) { delay(1000); LoRa.end(); LoRa.sleep(); pinMode(4,INPUT); pinMode(5,INPUT); pinMode(14,INPUT); pinMode(15,INPUT); pinMode(16,INPUT); pinMode(17,INPUT); pinMode(18,INPUT); pinMode(19,INPUT); pinMode(26,INPUT); pinMode(27,INPUT); digitalWrite(Vext,HIGH); delay(2); esp_deep_sleep_start(); } if(resendflag) { resendflag=false; send(); LoRa.receive(); } if(receiveflag) { digitalWrite(25,HIGH); Serial.print("Received Size "); Serial.print(packSize); Serial.print(" pakeges: "); Serial.print(packet); Serial.print(" With "); Serial.println(rssi); receiveflag = false; delay(1000); send(); LoRa.receive(); } } void send() { LoRa.beginPacket(); LoRa.print("hello "); LoRa.print(counter++); LoRa.endPacket(); Serial.print("Packet "); Serial.print(counter-1); Serial.println(" sent done"); } void onReceive(int packetSize)//LoRa receiver interrupt service { //if (packetSize == 0) return; packet = ""; packSize = String(packetSize,DEC); while (LoRa.available()) { packet += (char) LoRa.read(); } rssi = "RSSI: " + String(LoRa.packetRssi(), DEC); receiveflag = true; } |
HELTEC WIFI 32 / ESP32 OLED Test Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
#include "Arduino.h" #include "heltec.h" #include "images.h" #define DEMO_DURATION 3000 typedef void (*Demo)(void); int demoMode = 0; int counter = 1; void setup() { Heltec.begin(true /*DisplayEnable Enable*/, false /*LoRa Disable*/, true /*Serial Enable*/); Heltec.display->flipScreenVertically(); Heltec.display->setFont(ArialMT_Plain_10); } void drawFontFaceDemo() { // Font Demo1 // create more fonts at http://oleddisplay.squix.ch/ Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->setFont(ArialMT_Plain_10); Heltec.display->drawString(0, 0, "Hello world"); Heltec.display->setFont(ArialMT_Plain_16); Heltec.display->drawString(0, 10, "Hello world"); Heltec.display->setFont(ArialMT_Plain_24); Heltec.display->drawString(0, 26, "Hello world"); } void drawTextFlowDemo() { Heltec.display->setFont(ArialMT_Plain_10); Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->drawStringMaxWidth(0, 0, 128, "Lorem ipsum\n dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore." ); } void drawTextAlignmentDemo() { // Text alignment demo Heltec.display->setFont(ArialMT_Plain_10); // The coordinates define the left starting point of the text Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->drawString(0, 10, "Left aligned (0,10)"); // The coordinates define the center of the text Heltec.display->setTextAlignment(TEXT_ALIGN_CENTER); Heltec.display->drawString(64, 22, "Center aligned (64,22)"); // The coordinates define the right end of the text Heltec.display->setTextAlignment(TEXT_ALIGN_RIGHT); Heltec.display->drawString(128, 33, "Right aligned (128,33)"); } void drawRectDemo() { // Draw a pixel at given position for (int i = 0; i < 10; i++) { Heltec.display->setPixel(i, i); Heltec.display->setPixel(10 - i, i); } Heltec.display->drawRect(12, 12, 20, 20); // Fill the rectangle Heltec.display->fillRect(14, 14, 17, 17); // Draw a line horizontally Heltec.display->drawHorizontalLine(0, 40, 20); // Draw a line horizontally Heltec.display->drawVerticalLine(40, 0, 20); } void drawCircleDemo() { for (int i=1; i < 8; i++) { Heltec.display->setColor(WHITE); Heltec.display->drawCircle(32, 32, i*3); if (i % 2 == 0) { Heltec.display->setColor(BLACK); } Heltec.display->fillCircle(96, 32, 32 - i* 3); } } void drawProgressBarDemo() { int progress = (counter / 5) % 100; // draw the progress bar Heltec.display->drawProgressBar(0, 32, 120, 10, progress); // draw the percentage as String Heltec.display->setTextAlignment(TEXT_ALIGN_CENTER); Heltec.display->drawString(64, 15, String(progress) + "%"); } void drawImageDemo() { // see http://blog.squix.org/2015/05/esp8266-nodemcu-how-to-create-xbm.html // on how to create xbm files Heltec.display->drawXbm(34, 14, WiFi_Logo_width, WiFi_Logo_height, WiFi_Logo_bits); } Demo demos[] = {drawFontFaceDemo, drawTextFlowDemo, drawTextAlignmentDemo, drawRectDemo, drawCircleDemo, drawProgressBarDemo, drawImageDemo}; int demoLength = (sizeof(demos) / sizeof(Demo)); long timeSinceLastModeSwitch = 0; void loop() { // clear the display Heltec.display->clear(); // draw the current demo method demos[demoMode](); Heltec.display->setTextAlignment(TEXT_ALIGN_RIGHT); Heltec.display->drawString(10, 128, String(millis())); // write the buffer to the display Heltec.display->display(); if (millis() - timeSinceLastModeSwitch > DEMO_DURATION) { demoMode = (demoMode + 1) % demoLength; timeSinceLastModeSwitch = millis(); } counter++; delay(10); } |
ESP8 WIFI8 / ESP8266 Factory Test Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
#include "heltec.h" #include "ESP8266WiFi.h" //unsigned int counter = 0; void WIFISetUp(void) { // Set WiFi to station mode and disconnect from an AP if it was previously connected WiFi.disconnect(true); delay(100); WiFi.mode(WIFI_STA); WiFi.setAutoConnect(true); WiFi.begin("WiFi SSID","WiFi Password");//fill in "Your WiFi SSID","Your Password" delay(100); Heltec.display->clear(); byte count = 0; while(WiFi.status() != WL_CONNECTED && count < 10) { count ++; delay(500); Heltec.display->drawString(0, 0, "Connecting..."); Heltec.display->display(); } //Heltec.display->clear(); if(WiFi.status() == WL_CONNECTED) { //Heltec.display->drawString(35, 38, "WIFI SETUP"); Heltec.display->drawString(0, 9, "OK"); Heltec.display->display(); delay(1000); Heltec.display->clear(); } else { //Heltec.display->clear(); Heltec.display->drawString(0, 9, "Failed"); Heltec.display->display(); delay(1000); Heltec.display->clear(); } } void WIFIScan(unsigned int value) { unsigned int i; WiFi.mode(WIFI_STA); for(i=0;i<value;i++) { Heltec.display->drawString(0, 0, "Scan start..."); Heltec.display->display(); int n = WiFi.scanNetworks(); Heltec.display->drawString(0, 9, "Scan done"); Heltec.display->display(); delay(500); Heltec.display->clear(); if (n == 0) { Heltec.display->clear(); Heltec.display->drawString(0, 18, "no network found"); Heltec.display->display(); while(1); } else { Heltec.display->drawString(0, 18, (String)n + " nets found"); Heltec.display->display(); delay(2000); Heltec.display->clear(); } } } void setup() { //pinMode(LED,OUTPUT); Heltec.begin(true /*DisplayEnable Enable*/, true /*Serial Enable*/); WIFISetUp(); WIFIScan(1); } void loop() { } |
ESP8266 OLED Test Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
#include <Wire.h> // Only needed for Arduino 1.6.5 and earlier #include "heltec.h" // alias for `#include "SSD1306Wire.h"` #include "images.h" #define DEMO_DURATION 3000 typedef void (*Demo)(void); int demoMode = 0; int counter = 1; void setup() { Heltec.begin(true /*DisplayEnable Enable*/, true /*Serial Enable*/); Heltec.display->flipScreenVertically(); Heltec.display->setFont(ArialMT_Plain_10); } void drawFontFaceDemo() { // Font Demo1 // create more fonts at http://oledHeltec.display->squix.ch/ Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->setFont(ArialMT_Plain_10); Heltec.display->drawString(0, 0, "14CORE | TEST"); Heltec.display->setFont(ArialMT_Plain_16); Heltec.display->drawString(0, 10, "14CORE | TEST"); } void drawTextFlowDemo() { Heltec.display->setFont(ArialMT_Plain_10); Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->drawStringMaxWidth(0, 0, 128, "Lorem ipsum\n dolor sit amet, consetetur sadipscing elitr" ); } void drawTextAlignmentDemo() { // Text alignment demo Heltec.display->setFont(ArialMT_Plain_10); // The coordinates define the left starting point of the text Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); Heltec.display->drawString(0, 0, "Left aligned (0,10)"); // The coordinates define the center of the text Heltec.display->setTextAlignment(TEXT_ALIGN_CENTER); Heltec.display->drawString(64, 10, "Center aligned (64,10)"); // The coordinates define the right end of the text Heltec.display->setTextAlignment(TEXT_ALIGN_RIGHT); Heltec.display->drawString(128, 20, "Right aligned (128,20)"); } void drawRectDemo() { // Draw a pixel at given position for (int i = 0; i < 10; i++) { Heltec.display->setPixel(i, i); Heltec.display->setPixel(10 - i, i); } Heltec.display->drawRect(12, 12, 20, 20); // Fill the rectangle Heltec.display->fillRect(14, 14, 17, 17); // Draw a line horizontally Heltec.display->drawHorizontalLine(0, 40, 20); // Draw a line horizontally Heltec.display->drawVerticalLine(40, 0, 20); } void drawCircleDemo() { for (int i=1; i < 8; i++) { Heltec.display->setColor(WHITE); Heltec.display->drawCircle(32, 16, i*2); if (i % 2 == 0) { Heltec.display->setColor(BLACK); } Heltec.display->fillCircle(96, 16, 32 - i* 2); } } void drawProgressBarDemo() { int progress = (counter / 5) % 100; // draw the progress bar Heltec.display->drawProgressBar(0, 10, 120, 10, progress); // draw the percentage as String Heltec.display->setTextAlignment(TEXT_ALIGN_CENTER); Heltec.display->drawString(64, 0, String(progress) + "%"); } void drawImageDemo() { Heltec.display->drawXbm(34, 0, WiFi_Logo_width, WiFi_Logo_height, WiFi_Logo_bits); } Demo demos[] = {drawFontFaceDemo, drawTextFlowDemo, drawTextAlignmentDemo, drawRectDemo, drawCircleDemo, drawProgressBarDemo, drawImageDemo}; int demoLength = (sizeof(demos) / sizeof(Demo)); long timeSinceLastModeSwitch = 0; void loop() { // clear the display Heltec.display->clear(); // draw the current demo method demos[demoMode](); Heltec.display->setTextAlignment(TEXT_ALIGN_RIGHT); Heltec.display->drawString(10, 128, String(millis())); // write the buffer to the display Heltec.display->display(); if (millis() - timeSinceLastModeSwitch > DEMO_DURATION) { demoMode = (demoMode + 1) % demoLength; timeSinceLastModeSwitch = millis(); } counter++; delay(10); } |
Downloads / Resource & Libraries
- HELTEC ESP8266 Code Library & Example Codes | https://github.com/HelTecAutomation/Heltec_ESP8266
- HELTEC WIFI 32 / ESP32 & Example Codes | https://github.com/HelTecAutomation/Heltec_ESP32
- Download HELTEC WiFi 32 Pinout Diagram | PDF
- Download HELTEC WiFi 8 Pinout Diagram | PDF
- Download HELTEC Wifi 32 Schematics Diagram | PDF
- Download HELTEC Wifi 8 Schematics Diagram | PDF
- Download Schematics Diagram WIFI LoRa 32 V2 433 | PDF
- Download Schematics Diagram WiFi LoRa 32 V2 868 | PDF
- Download ESP32 AT Command Set Manual | PDF
- Download HELTEC ESP8266 Library | Zip
- Download HELTEC ESP32 Code Library | Zip