1234567891011121314151617181920212223242526272829303132333435363738 |
- /*
- Basic test program, send date at the BAND you seted.
-
- by Aaron.Lee from HelTec AutoMation, ChengDu, China
- 成都惠利特自动化科技有限公司
- www.heltec.cn
-
- this project also realess in GitHub:
- https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series
- */
- #include "heltec.h"
- #define BAND 433E6 //you can set band here directly,e.g. 868E6,915E6
- int counter = 0;
- void setup() {
-
- //WIFI Kit series V1 not support Vext control
- Heltec.begin(true /*DisplayEnable Enable*/, true /*Heltec.LoRa Disable*/, true /*Serial Enable*/, true /*PABOOST Enable*/, BAND /*long BAND*/);
-
- }
- void loop() {
- Serial.print("Sending packet: ");
- Serial.println(counter);
- // send packet
- LoRa.beginPacket();
- LoRa.print("hello ");
- LoRa.print(counter);
- LoRa.endPacket();
-
- counter++;
- digitalWrite(25, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(1000); // wait for a second
- digitalWrite(25, LOW); // turn the LED off by making the voltage LOW
- delay(1000); // wait for a second
- }
|