Skip to content

Commit d8115ca

Browse files
committed
Fix example WiFi_LoRa_32FactoryTest
1 parent d24b649 commit d8115ca

File tree

2 files changed

+53
-4
lines changed

2 files changed

+53
-4
lines changed

examples/Factory_Test/WiFi_LoRa_32FactoryTest/WiFi_LoRa_32FactoryTest.ino

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void WIFISetUp(void)
5151
delay(1000);
5252
WiFi.mode(WIFI_STA);
5353
WiFi.setAutoConnect(true);
54-
WiFi.begin("Your WIFI SSID","Your WIFI Password");
54+
WiFi.begin("HelTec_AutoMation","hunter_3120");
5555
delay(100);
5656

5757
byte count = 0;
@@ -75,7 +75,7 @@ void WIFISetUp(void)
7575
Heltec.display -> clear();
7676
Heltec.display -> drawString(0, 0, "Connecting...Failed");
7777
Heltec.display -> display();
78-
while(1);
78+
//w hile(1);
7979
}
8080
Heltec.display -> drawString(0, 10, "WIFI Setup done");
8181
Heltec.display -> display();
@@ -131,7 +131,7 @@ void WIFIScan(unsigned int value)
131131

132132
void setup()
133133
{
134-
Heltec.begin(true /*DisplayEnable Enable*/, true /*LoRa Enable*/, true /*Serial Enable*/, true /*LoRa use PABOOST*/, 470E6 /*LoRa RF working band*/);
134+
Heltec.begin(true /*DisplayEnable Enable*/, true /*LoRa Enable*/, true /*Serial Enable*/, true /*LoRa use PABOOST*/, 868E6 /*LoRa RF working band*/);
135135

136136
logo();
137137
delay(300);
@@ -165,6 +165,17 @@ void loop()
165165

166166
Heltec.display -> clear();
167167
}
168+
if(receiveflag)
169+
{
170+
Heltec.display -> drawString(0, 0, "Received " + packSize + " packages:");
171+
Heltec.display -> drawString(0, 10, packet);
172+
Heltec.display -> drawString(0, 20, "With " + rssi);
173+
Heltec.display -> display();
174+
175+
digitalWrite(25,LOW);
176+
177+
receiveflag = false;
178+
}
168179
}
169180

170181
void onReceive(int packetSize)//LoRa receiver interrupt service
@@ -184,4 +195,3 @@ void onReceive(int packetSize)//LoRa receiver interrupt service
184195

185196
receiveflag = true;
186197
}
187-

src/oled/SSD1306.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2018 by ThingPulse, Daniel Eichhorn
5+
* Copyright (c) 2018 by Fabrice Weinberg
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
*
25+
* ThingPulse invests considerable time and money to develop these open source libraries.
26+
* Please support us by buying our products (and not the clones) from
27+
* https://thingpulse.com
28+
*
29+
*/
30+
31+
#ifndef SSD1306_h
32+
#define SSD1306_h
33+
#include "SSD1306Wire.h"
34+
35+
// For legacy support make SSD1306 an alias for SSD1306
36+
typedef SSD1306Wire SSD1306;
37+
38+
39+
#endif

0 commit comments

Comments
 (0)