Skip to content

Commit e06e9ad

Browse files
committed
Fix Examples for new BSP versions
1 parent bd70b9b commit e06e9ad

File tree

33 files changed

+37
-13
lines changed

33 files changed

+37
-13
lines changed

examples/RAK11200/solutions/weather_display/wifi.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ void wifi_disconnect_callback(WiFiEvent_t event, WiFiEventInfo_t info)
160160
void wifi_init()
161161
{
162162
// set event function for specific event
163-
WiFi.onEvent(wifi_got_ip_callback, WiFiEvent_t::SYSTEM_EVENT_STA_GOT_IP);
164-
WiFi.onEvent(wifi_disconnect_callback, WiFiEvent_t::SYSTEM_EVENT_STA_DISCONNECTED);
163+
WiFi.onEvent(wifi_got_ip_callback, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_GOT_IP);
164+
WiFi.onEvent(wifi_disconnect_callback, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_DISCONNECTED);
165165
// start wifi with stored wifi config
166166
WiFi.begin();
167167
}

examples/RAK4630/IO/RAK18000_Stereo/RAK18000_Stereo.ino

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
WB_A0 <-> P0.04/AIN2 (AnalogIn A2)
2222
WB_A1 <-> P0.31/AIN7 (AnalogIn A7)
2323
*/
24+
#include <Wire.h>
2425

2526
#include <PDM.h>
2627

examples/RAK4630/IO/RAK5801_4-20mA/RAK5801_4-20mA.ino

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#include <Arduino.h>
11+
#include <Wire.h>
1112

1213
#define NO_OF_SAMPLES 32
1314

examples/RAK4630/IO/RAK5802_RS485/Receiver/Receiver.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @date 2020-07-28
77
* @copyright Copyright (c) 2020
88
*/
9+
#include <Wire.h>
910

1011
#include <ArduinoRS485.h> //Click here to get the library: http://librarymanager/All#ArduinoRS485
1112

examples/RAK4630/IO/RAK5802_RS485/Sender/Sender.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @date 2020-07-28
77
* @copyright Copyright (c) 2020
88
*/
9+
#include <Wire.h>
910

1011
#include <ArduinoRS485.h> //Click here to get the library: http://librarymanager/All#ArduinoRS485
1112

examples/RAK4630/IO/RAK5811_0-5V/RAK5811_0-5V.ino

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#include <Arduino.h>
11+
#include <Wire.h>
1112

1213
#define NO_OF_SAMPLES 32
1314

examples/RAK4630/communications/BLE/BLE_Health/BLE_Health.ino

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
**/
99

1010
#include <bluefruit.h>
11+
#include <Wire.h>
1112

1213
BLEService hrms = BLEService(UUID16_SVC_HEART_RATE);
1314
BLECharacteristic hrmc = BLECharacteristic(UUID16_CHR_HEART_RATE_MEASUREMENT);

examples/RAK4630/communications/BLE/ble_ota_dfu/ble_ota_dfu.ino

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
#include <Arduino.h>
2323
#include <bluefruit.h>
24+
#include <Wire.h>
2425

2526
// Forward declarations for functions
2627
void connect_callback(uint16_t conn_handle);

examples/RAK4630/communications/BLE/ble_proximity_sensing/ble_proximity_sensing.ino

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626

2727
#include <bluefruit.h>
28+
#include <Wire.h>
2829

2930
#define MAX_COUNT_NUM (5)
3031
#define AVERAGE_RSSI_VAL (-40)

examples/RAK4630/communications/BLE/ble_uart/ble_uart.ino

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
#include <Arduino.h>
2323
#include <bluefruit.h>
24+
#include <Wire.h>
2425

2526
// Forward declarations for functions
2627
void ble_connect_callback(uint16_t conn_handle);

examples/RAK4630/communications/WiFi/AT_Command_Test/AT_Command_Test.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
WB_A0 <-> P0.04/AIN2 (AnalogIn A2)
2222
WB_A1 <-> P0.31/AIN7 (AnalogIn A7)
2323
*/
24-
24+
#include <Wire.h>
2525
void setup()
2626
{
2727
time_t timeout = millis();

examples/RAK4630/communications/WiFi/connect_ap/connect_ap.ino

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
WB_A0 <-> P0.04/AIN2 (AnalogIn A2)
2222
WB_A1 <-> P0.31/AIN7 (AnalogIn A7)
2323
*/
24+
#include <Wire.h>
2425

2526
#define WIFI_SSID "Room-905"
2627
#define WIFI_PASSWORD "Mxjmxj_905"

examples/common/IO/RAK12006_MotionDetection/RAK12006_MotionDetection.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @date 2021-06-15
77
* @copyright Copyright (c) 2021
88
*/
9+
#include <Wire.h>
910
#define SENSOR_PIN WB_IO6 // Attach AM312 sensor to Arduino Digital Pin WB_IO6
1011

1112
int gCurrentStatus = 0; // variable for reading the pin current status

examples/common/IO/RAK12017_IR_ITR20001T/RAK12017_Detect_Color/RAK12017_Detect_Color.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@date 2021-8-28
77
@copyright Copyright (c) 2020
88
**/
9+
#include <Wire.h>
910

1011
void setup()
1112
{

examples/common/IO/RAK12017_IR_ITR20001T/RAK12017_Detect_Switch/RAK12017_Detect_Switch.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@date 2021-8-28
77
@copyright Copyright (c) 2020
88
**/
9+
#include <Wire.h>
910

1011
void setup()
1112
{

examples/common/IO/RAK12018_CodeReader_LV3296/RAK12018_CodeReader_LV3296.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@date 2021-8-28
77
@copyright Copyright (c) 2020
88
**/
9+
#include <Wire.h>
910

1011
void setup()
1112
{

examples/common/IO/RAK13001_Relay_OUT_Optocoupled_IN/RAK13001_Relay_OUT_Optocoupled_IN.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@date 2021-3-18
77
@copyright Copyright (c) 2021
88
**/
9+
#include <Wire.h>
910

1011
#define OC_PIN WB_IO3
1112
#define RELAY_PIN WB_IO4

examples/common/IO/RAK13005_LIN_BUS/LINBusCommunication/RAK13005_linbus_master/RAK13005_linbus_master.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @date 2021-05-01
77
* @copyright Copyright (c) 2021
88
*/
9+
#include <Wire.h>
910
#include "lin_bus.h" //library: http://librarymanager/All#RAKwireless_TLE7259_LIN_Bus_library
1011

1112
#if defined(_VARIANT_RAK4630_)

examples/common/IO/RAK13005_LIN_BUS/LINBusCommunication/RAK13005_linbus_slaver/RAK13005_linbus_slaver.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @date 2021-05-01
77
* @copyright Copyright (c) 2021
88
*/
9+
#include <Wire.h>
910
#include "lin_bus.h" //library: http://librarymanager/All#RAKwireless_TLE7259_LIN_Bus_library
1011

1112
#if defined(_VARIANT_RAK4630_)

examples/common/IO/RAK13005_LIN_BUS/LINBusControlLED/RAK13005_linbus_master/RAK13005_linbus_master.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @date 2021-05-01
77
* @copyright Copyright (c) 2021
88
*/
9+
#include <Wire.h>
910
#include "lin_bus.h" //library: http://librarymanager/All#RAKwireless_TLE7259_LIN_Bus_library
1011

1112
#if defined(_VARIANT_RAK4630_)

examples/common/IO/RAK13005_LIN_BUS/LINBusControlLED/RAK13005_linbus_slaver/RAK13005_linbus_slaver.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @date 2021-05-01
77
* @copyright Copyright (c) 2021
88
*/
9+
#include <Wire.h>
910
#include "lin_bus.h" //library: http://librarymanager/All#RAKwireless_TLE7259_LIN_Bus_library
1011

1112
#if defined(_VARIANT_RAK4630_)

examples/common/IO/RAK14000-Epaper-TriColor/RAK14000-Epaper-TriColor.ino

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
1111
*/
1212
#include <Arduino.h>
13+
#include <Wire.h>
1314

1415
#include <Adafruit_GFX.h>
1516
#include <Adafruit_EPD.h>

examples/common/IO/RAK14006_Rotary_Encoder/RAK14006_Rotary_Encoder.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@date 2021-7-28
77
@copyright Copyright (c) 2020
88
**/
9+
#include <Wire.h>
910

1011
#define ENCODER_A_PIN WB_IO6 //clockwise
1112
#define ENCODER_B_PIN WB_IO4 //anticlockwise

examples/common/communications/Cellular/RAK13101_MC20_Module/GPS/GPS.ino

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@copyright Copyright (c) 2020
88
**/
99
#include <TinyGPS.h> //http://librarymanager/All#TinyGPS
10+
#include <Wire.h>
1011

1112
TinyGPS gps;
1213
String tmp_data = "";

examples/common/communications/Cellular/RAK13101_MC20_Module/GSM_TCP/GSM_TCP.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@date 2021-6-28
77
@copyright Copyright (c) 2020
88
**/
9+
#include <Wire.h>
910

1011
#define POWER_KEY WB_IO5
1112
String at_rsp = "";

examples/common/communications/Cellular/RAK13101_MC20_Module/Unvarnished_Transmission/Unvarnished_Transmission.ino

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
@copyright Copyright (c) 2020
88
**/
99

10+
#include <Wire.h>
11+
1012
#define POWER_KEY WB_IO5
1113

1214
void setup()

examples/common/communications/Cellular/RAK5860_BG77_Module/BG77_Unvarnished_Transmission/BG77_Unvarnished_Transmission.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
@date 2020-12-28
77
@copyright Copyright (c) 2020
88
**/
9-
10-
#include "SPI.h"
9+
#include <Wire.h>
1110

1211
#define BG77_POWER_KEY WB_IO1
1312

examples/common/communications/Cellular/RAK5860_BG77_Module/Cellular_Ping/Cellular_Ping.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
@date 2020-12-28
77
@copyright Copyright (c) 2020
88
**/
9-
10-
11-
#include "SPI.h"
9+
#include <Wire.h>
1210

1311
#define BG77_POWER_KEY WB_IO1
1412
String bg77_rsp = "";

examples/common/communications/Cellular/RAK5860_BG77_Module/Hologram_Ping_LTE/Hologram_Ping_LTE.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
A1 <-> P0.31/AIN7 (Arduino Analog A7
2121
SPI_CS <-> P0.26 (Arduino GPIO number 26)
2222
*/
23-
24-
#include "SPI.h"
23+
#include <Wire.h>
2524

2625
#define BG77_POWER_KEY 17
2726
char cArr[128] = {0};

examples/common/communications/Cellular/RAK5860_BG77_Module/Hologram_Tcp/Hologram_Tcp.ino

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
@date 2020-12-28
77
@copyright Copyright (c) 2020
88
**/
9-
10-
11-
#include "SPI.h"
9+
#include <Wire.h>
1210

1311
#define BG77_POWER_KEY WB_IO1
1412
#define BG77_GPS_ENABLE WB_IO2

examples/common/sensors/RAK12500_GPS_ZOE-M8Q/RAK12500_GPS_ZOE-M8Q_UART/RAK12500_GPS_ZOE-M8Q_UART.ino

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@date 2021-1-28
77
@copyright Copyright (c) 2021
88
**/
9+
#include <Wire.h>
910

1011
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS
1112

examples/common/sensors/RAK1910_GPS_UBLOX7/RAK1910_GPS_UBLOX7.ino

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
@copyright Copyright (c) 2020
88
**/
99

10+
#include <Wire.h>
11+
1012
#include <TinyGPS.h> //http://librarymanager/All#TinyGPS
1113

1214
TinyGPS gps;

examples/common/sensors/RAK1920_Grove_PIR_AS312/RAK1920_Grove_PIR_AS312.ino

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
@copyright Copyright (c) 2020
88
**/
99

10+
#include <Wire.h>
11+
1012
void setup()
1113
{
1214
pinMode(WB_IO2, OUTPUT);

0 commit comments

Comments
 (0)