Created
January 6, 2020 21:56
-
-
Save giljr/230bf99c83b014029efa51dbaf91b141 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Project : FreeRTOS - How to Get Started! | |
Episode 01 : Hello world ESP-32 - Using Heltec WiFi LoRa 32 | |
File : heltec_oled_hello_world.ino | |
Webpage : https://medium.com/jungletronics/meet-iot-boards-esp8266-esp32-ba12e41c1a3b | |
Hardware : https://heltec.org/project/wifi-lora-32/ | |
*/ | |
#include <heltec.h> | |
#include "Arduino.h" | |
// the setup routine runs once when starts up | |
void setup() | |
{ | |
// Initialize the Heltec ESP32 object | |
Heltec.begin(true /*DisplayEnable Enable*/, false /*LoRa Disable*/, true /*Serial Enable*/, false /*PABOOST Enable*/, 470E6 /**/); | |
Heltec.display->flipScreenVertically(); | |
Heltec.display->setFont(ArialMT_Plain_10); | |
} | |
void loop() | |
{ | |
// clear the display | |
Heltec.display->clear(); | |
Heltec.display->setFont(ArialMT_Plain_10); | |
Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT); | |
Heltec.display->drawStringMaxWidth(0, 0, 128, String(millis())); | |
Heltec.display->display(); | |
delay(10); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment