You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
540 B

  1. #include <Arduino.h>
  2. #include <easywifi.h>
  3. #define WIFI_SSID "somessid"
  4. #define WIFI_PASSWORD "somepassword"
  5. void setup() {
  6. Serial.begin( 9600 );
  7. while(!Serial); // wait until the serial connection is stablished
  8. // connect to existing access point as client
  9. if( wifi_connect_as_client(WIFI_SSID, WIFI_PASSWORD) ) {
  10. // print debugging information
  11. wifi_print_mode();
  12. wifi_print_ip();
  13. } else {
  14. Serial.print("Failed to connect to wifi ");
  15. Serial.print( WIFI_SSID );
  16. Serial.println();
  17. }
  18. }
  19. void loop() {
  20. }