minor changes, added ALL required externals

This commit is contained in:
2021-03-14 15:20:44 +01:00
parent 3da4722748
commit 5e8ba82e6e
22 changed files with 1853 additions and 30 deletions

View File

@@ -11,15 +11,13 @@ const uint16_t localPort = 1337;
const char* remoteIP = "255.255.255.255"; // BUZZER
const uint16_t remotePort = 7331;
//char ssid[32] = "OGWLAN";
//char password[64] = "LeckereKekse!";
// TPLink AP
char ssid[32] = "buzzer";
char password[64] = "RLzW15yWm342Vts2";
//char ssid[32] = "UGWLAN";
//char ssid[32] = "Buzzer";
//char password[64] = "LeckereKekse!";
char ssid[32] = "Buzzer";
char password[64] = "LeckereKekse!";
@@ -42,19 +40,19 @@ void onWifiEvent(System_Event_t* evt) {
case EVENT_STAMODE_CONNECTED:
os_printf("connect to ssid %s, channel %d\n", evt->event_info.connected.ssid, evt->event_info.connected.channel);
buzzer.setRGB(0,0,255); // blue
buzzer.setRGB(0,255,0); // LED green
break;
case EVENT_STAMODE_GOT_IP:
os_printf("got IP\n");
buzzer.setOff();
buzzer.setOff(); // LED off
connected = true;
buzzer.sendHeartbeat();
break;
case EVENT_STAMODE_DISCONNECTED:
os_printf("disconnect from ssid %s, reason %d\n", evt->event_info.disconnected.ssid, evt->event_info.disconnected.reason);
buzzer.setRGB(255,0,0);
buzzer.setRGB(255,0,0); // LED red
break;
}
@@ -72,8 +70,8 @@ void my_init() {
// stty -F /dev/ttyUSB0 115200 raw -echo && cat /dev/ttyUSB0
// yellow
buzzer.setRGB(255,255,0);
// white 1
buzzer.setRGB(64,64,64);
// register the event handler
wifi_set_event_handler_cb(onWifiEvent);
@@ -104,8 +102,8 @@ void my_init() {
//wifi_set_sleep_type(LIGHT_SLEEP_T);
//wifi_set_sleep_type(MODEM_SLEEP_T);
// green
buzzer.setRGB(0,255,0);
// white 2
buzzer.setRGB(128,128,128);
os_delay_us(1000*150);