Call to arms | Teensy + WiFi = true

Found it:ROFLMAO: The other examples have the wrong pin settings and the wrong Serial port. changed that on on of the other sketches and it works. Got errands to run so I can't test the other two until later...
 
Actually fairly simple where you don't even need to make use their brick:


Probably will play a bit more with this tomorrow.
Thanks @mjs513 - I have this stuff already working on Q, what I am wondering about is how to get this to work on
the T4.1 with this Wifi adapter ;)
 
Thanks @mjs513 - I have this stuff already working on Q, what I am wondering about is how to get this to work on
the T4.1 with this Wifi adapter ;)
WIth a little help I have something that does a little:
Code:
#include <QNEthernet.h>

using namespace qindesign::network ;

const char *server = "geocoding-api.open-meteo.com";
const int port = 80;
const char *resource = "/v1/search?name=DisneyLand";
constexpr uint32_t kDHCPTimeout = 15000;  // 15 seconds

EthernetClient client;

void setup() {
  Serial.begin(115200);
  while (!Serial && millis() < 4000);

  // Initialize Ethernet (DHCP)
  if (!Ethernet.begin()) {
    Serial.println("Failed to configure Ethernet using DHCP");
    return;
  }

  uint8_t mac[6];
  Ethernet.macAddress(mac);  // This is informative; it retrieves, not sets
  printf("MAC = %02x:%02x:%02x:%02x:%02x:%02x\r\n",
         mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);

  printf("Waiting for local IP...\r\n");
  if (!Ethernet.waitForLocalIP(kDHCPTimeout)) {
    printf("Failed to get IP address from DHCP\r\n");
    return;
  }

  IPAddress ip = Ethernet.localIP();
  printf("    Local IP    = %u.%u.%u.%u\r\n", ip[0], ip[1], ip[2], ip[3]);
  ip = Ethernet.subnetMask();
  printf("    Subnet mask = %u.%u.%u.%u\r\n", ip[0], ip[1], ip[2], ip[3]);
  ip = Ethernet.gatewayIP();
  printf("    Gateway     = %u.%u.%u.%u\r\n", ip[0], ip[1], ip[2], ip[3]);
  ip = Ethernet.dnsServerIP();
  printf("    DNS         = %u.%u.%u.%u\r\n", ip[0], ip[1], ip[2], ip[3]);

  printf("\r\n");



  Serial.print("Local IP: ");
  Serial.println(Ethernet.localIP());

  // Connect to server
  if (client.connect(server, port)) {
    Serial.println("Connected to server. Sending request...");

    // Send HTTP GET Request
    client.printf("GET %s HTTP/1.1\r\n", resource);
    client.printf("Host: %s\r\n", server);
    client.println("User-Agent: Teensy-QNEthernet");
    client.println("Connection: close");
    client.println();
  } else {
    Serial.println("Connection failed.");
  }
}

void loop() {
  // Read response stream
  while (client.available()) {
    char c = client.read();
    Serial.write(c);
  }

  // If server disconnects, stop client
  if (!client.connected() && !client.available()) {
    client.stop();
  }
}
Output:
Code:
MAC = 0c:80:2f:17:d2:82
Waiting for local IP...
Setting link up
    Local IP    = 192.168.2.52
    Subnet mask = 255.255.255.0
    Gateway     = 192.168.2.1
    DNS         = 192.168.2.1

Local IP: 192.168.2.52
Connected to server. Sending request...
HTTP/1.1 200 OK
Date: Sun, 30 Aug 2026 02:31:15 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 1150
Connection: close
X-Encoding-Time: 0.0025033950805664062 ms

{"results":[{"id":5343229,"name":"Disneyland","latitude":33.81207,"longitude":-117.91898,"elevation":42.0,"feature_code":"AMUS","country_code":"US","admin1_id":5332921,"admin2_id":5379524,"timezone":"America/Los_Angeles","country_id":6252001,"country":"United States","admin1":"California","admin2":"Orange"},{"id":6698160,"name":"Disneyland Resort Paris","latitude":48.86785,"longitude":2.77863,"elevation":121.0,"feature_code":"AMUS","country_code":"FR","admin1_id":3012874,"admin2_id":2975249,"admin3_id":6457363,"admin4_id":6443606,"timezone":"Europe/Paris","country_id":3017382,"country":"France","admin1":"Île-de-France Region","admin2":"Seine-et-Marne","admin3":"Arrondissement of Torcy","admin4":"Chessy"},{"id":12110875,"name":"Disneyland Paris Parc","latitude":48.87263,"longitude":2.77679,"elevation":122.0,"feature_code":"PRK","country_code":"FR","admin1_id":3012874,"admin2_id":2975249,"admin3_id":6457363,"admin4_id":6443606,"timezone":"Europe/Paris","country_id":3017382,"country":"France","admin1":"Île-de-France Region","admin2":"Seine-et-Marne","admin3":"Arrondissement of Torcy","admin4":"Chessy"}],"generationtime_ms":0.3119707}
 
Updated to process the JSON:
Code:
#include <QNEthernet.h>
#include <ArduinoJson.h>

using namespace qindesign::network;

const char *server = "geocoding-api.open-meteo.com";
const int port = 80;
const char *resource = "/v1/search?name=DisneyLand";
constexpr uint32_t kDHCPTimeout = 15000;  // 15 seconds

EthernetClient client;

void setup() {
  Serial.begin(115200);
  while (!Serial && millis() < 4000)
    ;

  // Initialize Ethernet (DHCP)
  if (!Ethernet.begin()) {
    Serial.println("Failed to configure Ethernet using DHCP");
    return;
  }

  uint8_t mac[6];
  Ethernet.macAddress(mac);  // This is informative; it retrieves, not sets
  printf("MAC = %02x:%02x:%02x:%02x:%02x:%02x\r\n",
         mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);

  printf("Waiting for local IP...\r\n");
  if (!Ethernet.waitForLocalIP(kDHCPTimeout)) {
    printf("Failed to get IP address from DHCP\r\n");
    return;
  }

  IPAddress ip = Ethernet.localIP();
  printf("    Local IP    = %u.%u.%u.%u\r\n", ip[0], ip[1], ip[2], ip[3]);
  ip = Ethernet.subnetMask();
  printf("    Subnet mask = %u.%u.%u.%u\r\n", ip[0], ip[1], ip[2], ip[3]);
  ip = Ethernet.gatewayIP();
  printf("    Gateway     = %u.%u.%u.%u\r\n", ip[0], ip[1], ip[2], ip[3]);
  ip = Ethernet.dnsServerIP();
  printf("    DNS         = %u.%u.%u.%u\r\n", ip[0], ip[1], ip[2], ip[3]);

  printf("\r\n");



  Serial.print("Local IP: ");
  Serial.println(Ethernet.localIP());

  // Connect to server
  if (client.connect(server, port)) {
    Serial.println("Connected to server. Sending request...");

    // Send HTTP GET Request
    client.printf("GET %s HTTP/1.1\r\n", resource);
    client.printf("Host: %s\r\n", server);
    client.println("User-Agent: Teensy-QNEthernet");
    client.println("Connection: close");
    client.println();
  } else {
    Serial.println("Connection failed.");
  }
}




JsonDocument doc;
void loop() {
  // Read response stream
  uint8_t state = 0;
  while (client.available()) {
    char c = client.read();

    // search for blank line:
    switch (state) {
      case 0:
        state = (c == '\r') ? 1 : 0;
        break;

      case 1:
        state = (c == '\n') ? 2 : 0;
        break;
      case 2:
        state = (c == '\r') ? 3 : 0;
        break;
      case 3:
        state = (c == '\n') ? 4 : 0;
        break;
    }
    if (state == 4) {
      DeserializationError error = deserializeJson(doc, client);

      if (!error) {
        const char *name = doc["results"][0]["name"];
        double latitude = doc["results"][0]["latitude"];
        double longitude = doc["results"][0]["longitude"];

        Serial.printf("Location: %s (Lat: %f, Lon: %f)\n", name, latitude, longitude);
      }
    }
  }

  // If server disconnects, stop client
  if (!client.connected() && !client.available()) {
    client.stop();
  }
}

Output:
Code:
Waiting for local IP...
Setting link up
    Local IP    = 192.168.2.52
    Subnet mask = 255.255.255.0
    Gateway     = 192.168.2.1
    DNS         = 192.168.2.1

Local IP: 192.168.2.52
Connected to server. Sending request...
Location: Disneyland (Lat: 33.812073, Lon: -117.918980)

Done for the night
 
@KurtE - If you don't mind I would like to add your example to my Ethernet examples repo on GitHub.
I checked the other two Bluetooth examples and they also seem to work. It is really interesting that this all works without the flow control signals. once we get the new boards with the working RTS/CTS the Serial baud rate will go from 115200 to 3000000. It shows some foresight on there part. Without the flow control signals the 3000000 baud rate might not work.
I have to get up at 3:00 AM tomorrow morning so it's :sleep:
 
Here is the temporary working Sparkfun Teensy Bluetooth library:
.
To use the two pins of the inverter must be shorted together as per post #335. Flow control has been disabled in each of the four sketches. the Bluetooth scan function has been verified to be working with my laptop Bluetooth monitor. How the rest of the examples are supposed to work well, I really don't know yet :unsure: Those with steadier hands than mine should be able to solder bridge the two pins on the inverter easier than I was able to...
 
Last edited:
Last edited:
Easy enough? Get the right one - don't let the RED fool you
1788124891863.png
1788124946699.png


Two examples -

CYW43439 BLE Server Example and Scan not getting to #5?:
Code:
CYW43439 BLE Scan Example
[SFBLEDevice] init()
[SFBLEDevice]   localName:   SF-Scanner
[SFBLEDevice]   btRegOnPin:  28
[SFBLEDevice]   rtsPin:      -1
[SFBLEDevice]   ctsPin:      -1
[SFBLEDevice]   starting BLE_Controller...
[BLE_Controller] begin()
[BLE_Controller]   bringing up chip...
[CYW43439_BT] begin()
[CYW43439_BT]   1. holding BT_REG_ON low (reset)
[CYW43439_BT]   2. opening UART at init baud
[CYW43439_BT]   3. releasing BT_REG_ON (boot ROM)
[CYW43439_BT]   4. sending HCI Reset
[CYW43439_BT]      waitCmdComplete timeout, opcode=0xC03, raw UART bytes received during wait=0
[CYW43439_BT]      HCI Reset failed, status=255
[BLE_Controller]   chip begin() failed
[SFBLEDevice]   BLE_Controller::begin() failed
BLE init failed – halting
 
@defragster - Not sure why it is not working for you. I'll download the library on another desktop and make sure it is working. In the mean time here is the scan sketch in full:
Code:
/**
 * BLE_Scan – SparkFun CYW43439 Bluetooth Library Example
 *
 * Continuously scans for BLE advertisements and prints each device
 * to Serial in a format similar to nRF Sniffer / BTSnoop output.
 * Demonstrates the callback-based scan API.
 *
 * Hardware (Teensy 4.x): same as BLE_Server example
 */

#include <SparkFun_BLE.h>

#define WL_REG_ON_PIN  30   // chip-enable for the CYW43439's WLAN/core regulator;
                             // must be asserted before BT_REG_ON or the BT UART
                             // will never respond (adjust to match your wiring)
#define BT_REG_ON_PIN  28
#define BT_RTS_PIN     -1 //36
#define BT_CTS_PIN     -1 //33
void waitInput();

// ---- Scan callback ----
class MyScanCallbacks : public SFBLEAdvertisedDeviceCallbacks {
    void onResult(SFBLEAdvertisedDevice &device) override {
        Serial.print("  Addr: ");
        Serial.print(device.getAddress().toString().c_str());
        Serial.print("  RSSI: ");
        Serial.print(device.getRSSI());
        if (device.getName().length() > 0) {
            Serial.print("  Name: ");
            Serial.print(device.getName().c_str());
        }
        if (device.haveServiceUUID()) {
            Serial.print("  Svc: ");
            Serial.print(device.getServiceUUID().toString().c_str());
        }
        Serial.print(device.isConnectable() ? "  [CONN]" : "  [NON-CONN]");
        Serial.println();
    }
};

void setup() {
    Serial.begin(115200);
    while (!Serial && millis() < 3000) {}
    Serial.println("CYW43439 BLE Scan Example");

    // Bring up the chip's main regulator before touching BT_REG_ON —
    // on combo WiFi/BT chips the BT block stays silent until this is asserted.
    pinMode(WL_REG_ON_PIN, OUTPUT);
    digitalWrite(WL_REG_ON_PIN, HIGH);
    delay(50);

    if (!SFBLEDevice::init("SF-Scanner", Serial8, BT_REG_ON_PIN,
                            BT_RTS_PIN, BT_CTS_PIN)) {
        Serial.println("BLE init failed – halting");
        while (1) {}
    }

    SFBLEScan *pScan = SFBLEDevice::getScan();
    pScan->setAdvertisedDeviceCallbacks(new MyScanCallbacks(), true /*duplicates*/);
    pScan->setActiveScan(true);
    pScan->setInterval(100);   // ms
    pScan->setWindow(80);      // ms (must be ≤ interval)
    SFBLEDevice::update();
}

void loop() {
    SFBLEDevice::update();

    if (!SFBLEDevice::getScan()->isScanning()) {
        Serial.println("--- Starting 5-second scan ---");
        SFBLEDevice::getScan()->clearResults();
        SFBLEDevice::getScan()->startAsync(5000);
    }
}

Will let you know...
 
scan sketch in full:
Copied to new sketch and same result - using this from github:
Using library SparkFun_Teensy_Bluetooth at version 1.0.0 in folder: T:\T_Drive\tCode\libraries\SparkFun_Teensy_Bluetooth

Code:
...
[CYW43439_BT]   4. sending HCI Reset
[CYW43439_BT]      waitCmdComplete timeout, opcode=0xC03, raw UART bytes received during wait=0
[CYW43439_BT]      HCI Reset failed, status=255
[BLE_Controller]   chip begin() failed
[SFBLEDevice]   BLE_Controller::begin() failed
BLE init failed – halting
 
OK, just downloaded https://github.com/wwatson4506/SparkFun_Teensy_Bluetooth/tree/Updated onto another desktop and put the library into Arduino/libraries. Using Arduino 1.8.19 and TD1.62 I uploaded "BLE_Scan.ino" to the T41 and the output was:
Code:
CYW43439 BLE Scan Example
[SFBLEDevice] init()
[SFBLEDevice]   localName:   SF-Scanner 
[SFBLEDevice]   btRegOnPin:  28              
[SFBLEDevice]   rtsPin:      -1                     
[SFBLEDevice]   ctsPin:      -1                    
[SFBLEDevice]   starting BLE_Controller...
[BLE_Controller] begin()
[BLE_Controller]   bringing up chip...
[CYW43439_BT] begin()
[CYW43439_BT]   1. holding BT_REG_ON low (reset)
[CYW43439_BT]   2. opening UART at init baud
[CYW43439_BT]   3. releasing BT_REG_ON (boot ROM)
[CYW43439_BT]   4. sending HCI Reset
[CYW43439_BT]   5. downloading firmware patch
[CYW43439_BT]   6. re-initialising UART after firmware launch
[CYW43439_BT]   7. skipping baud escalation (no flow control pins)
[CYW43439_BT]   8. setting event mask
[CYW43439_BT]   9. enabling LE host support
[CYW43439_BT]   10. setting LE event mask
[CYW43439_BT]   begin complete, chip ready
[BLE_Controller]   chip up
[BLE_Controller]   requesting BD address...
[BLE_Controller]   begin complete
[SFBLEDevice]   init complete
--- Starting 5-second scan ---
  Addr: 24:DC:C3:ED:62:DE  RSSI: -59  Name: Mysa  Svc: 4D790000-7361-5769-4669-436F6E666967  [CONN]
  Addr: 24:DC:C3:ED:62:DE  RSSI: -59  [NON-CONN]
  Addr: 00:1C:C2:A2:3A:C4  RSSI: -97  Name: DREOap05bC3  Svc: 5348  [CONN]
  Addr: 00:1C:C2:A2:3A:C4  RSSI: -97  [NON-CONN]
  Addr: 56:F0:55:50:A3:1A  RSSI: -93  [CONN]
  Addr: 56:F0:55:50:A3:1A  RSSI: -93  [NON-CONN]
  Addr: 24:DC:C3:ED:62:DA  RSSI: -95  Name: Mysa  Svc: 4D790000-7361-5769-4669-436F6E666967  [CONN]
  Addr: 24:DC:C3:ED:62:DA  RSSI: -95  [NON-CONN]
  Addr: 77:32:12:AA:B9:54  RSSI: -101  [CONN]
  Addr: 24:DC:C3:ED:62:A2  RSSI: -92  Name: Mysa  Svc: 4D790000-7361-5769-4669-436F6E666967  [CONN]
  Addr: 24:DC:C3:ED:62:A2  RSSI: -91  [NON-CONN]
  Addr: 24:DC:C3:ED:62:DE  RSSI: -76  Name: Mysa  Svc: 4D790000-7361-5769-4669-436F6E666967  [CONN]
  Addr: 24:DC:C3:ED:62:DE  RSSI: -76  [NON-CONN]
  Addr: 24:DC:C3:ED:62:CE  RSSI: -97  Name: Mysa  Svc: 4D790000-7361-5769-4669-436F6E666967  [CONN]
  Addr: 24:DC:C3:ED:62:CE  RSSI: -97  [NON-CONN]

It also worked with Arduino IDE 2.3.10 and TD0.65. One thing I did notice was the Sparkfun_Teensy_Bluetooth library was showing up in the "INCOMPATIBLE" portion of the examples menu on Arduino 1.8.19. Not sure why...
 
Just for the heck of it I started up my windows machine and tested the library on it. It worked there as well :confused: I am going to find out why the library is showing up in the "INCOMPATIBLE" portion of the examples menu...
 
In Examples as Incompatible here as well after restarting IDE 1.8.19.

Rebuilt using lib from github and again stalls at #4? Is the solder bad or wrong? Anything else needed?

Downloaded as ZIP and overwrote folder and it is the only LIB shown:
> Using library SparkFun_Teensy_Bluetooth at version 1.0.0 in folder: T:\T_Drive\tCode\libraries\SparkFun_Teensy_Bluetooth
 
The download zip file should be showing "SparkFun_Teensy_Bluetooth-Updated.zip". See post #298 for my setup...
Yes that was the name of it.

...\Downloads\SparkFun_Teensy_Bluetooth-Updated.zip\SparkFun_Teensy_Bluetooth-Updated

And CODE COMPARE of that in Libraries and GITHUB folder show no differences????
 
How is the SFun PCB connected to T_4.1?

Here it is the PJRC PCB with three parallel header sets. T_4.1 in one and SFun PCB in the next over - so 1.5" of routed wires that works fine for SDIO WiFI?
My setup sounds the same as yours except my board had the inline female sockets with long male pins solder to it, post #298...
 
setup sounds the same
Yes, the same!

I did solder the wrong chip first and that made the T_4.1 not boot (thus my RED comment). Might have damaged something - but the WiFI scan still works.

Don't do this assuming it was the right three legged side when it is the SMALLER part shown in prior pics p#360. Yes, using eyes - and magnification - is important. ... the p#335 simulated RED board image left for guess work here :(
1788135104102.png

Just swapped the T_4.1 (from the olde days of heat sink testing) with a fresh one and same result.
 
Yes, the same!

I did solder the wrong chip first and that made the T_4.1 not boot (thus my RED comment). Might have damaged something - but the WiFI scan still works.

Don't do this assuming it was the right three legged side when it is the SMALLER part shown in prior pics p#360. Yes, using eyes - and magnification - is important. ... the p#335 simulated RED board image left for guess work here :(
View attachment 39773
Just swapped the T_4.1 (from the olde days of heat sink testing) with a fresh one and same result.
Dang, I think that other IC is the added voltage regulator:eek: I did not catch that at first. The inverter chip is the one next to the CYW43439 chip and the RX pin label. Unfortunately they look the same:confused:
 
the added voltage regulator
Yes, seems like :eek:. Plugged it in and it didn't show up? SFun PCB oddly warm as a short will do - closer look beyond the OBVIOUS chip to find the MUCH SMALLER ONE harder to see at less than half the size.

Better light and magnification found the right one - but the obvious one was easier to find and solder :(
 
@KurtE - If you don't mind I would like to add your example to my Ethernet examples repo on GitHub.
I checked the other two Bluetooth examples and they also seem to work. It is really interesting that this all works without the flow control signals. once we get the new boards with the working RTS/CTS the Serial baud rate will go from 115200 to 3000000. It shows some foresight on there part. Without the flow control signals the 3000000 baud rate might not work.
I have to get up at 3:00 AM tomorrow morning so it's :sleep:
We probably can and should add some examples like this. @mjs513 and I were hacking away on one that actually retrieves the
Weather information. There are still problems with my most recent one where I tried to merge the earlier sketch that retrieved the
Lat/Long of city names and then used that to talk to the calls to retrieve the weather information.

Currently I have it default to something like Disneyland and returns data like:
Code:
Waiting for local IP...
Setting link up
Local IP: 192.168.2.52

[0/3] Map City to Location...
Name Query:/v1/search?name=Disneyland&count=1

====================== Map City ======================
Name:                Disneyland
latitude:            33.812073
longitude:           -117.918980
Time Zone:           America/Los_Angeles

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-08-30T19:30
Condition:           Clear sky (Code 0)
Temperature:         75.4 °F
Pressure (MSL):      1010.4 hPa
Wind Speed:          6.8 mph
Wind Direction:      232°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time        PoP%    Rain     Snow     Wind
-----------------------------------------------------------------------------------------------------
   00:00       0%    0.00 in   0.00 in   3.5 mph
   01:00       0%    0.00 in   0.00 in   4.3 mph
   02:00       0%    0.00 in   0.00 in   4.3 mph
   03:00       0%    0.00 in   0.00 in   2.4 mph
   04:00       0%    0.00 in   0.00 in   2.6 mph
   05:00       0%    0.00 in   0.00 in   0.7 mph
   06:00       0%    0.00 in   0.00 in   2.4 mph
   07:00       0%    0.00 in   0.00 in   2.2 mph
   08:00       0%    0.00 in   0.00 in   3.4 mph
   09:00       0%    0.00 in   0.00 in   1.6 mph
   10:00       0%    0.00 in   0.00 in   1.2 mph
   11:00       0%    0.00 in   0.00 in   2.7 mph
   12:00       0%    0.00 in   0.00 in   8.1 mph
   13:00       0%    0.00 in   0.00 in   7.0 mph
   14:00       0%    0.00 in   0.00 in   9.4 mph
   15:00       0%    0.00 in   0.00 in   8.2 mph
   16:00       0%    0.00 in   0.00 in   7.6 mph
   17:00       0%    0.00 in   0.00 in   7.3 mph
   18:00       0%    0.00 in   0.00 in   9.1 mph
   19:00       0%    0.00 in   0.00 in   7.4 mph
   20:00       0%    0.00 in   0.00 in   6.0 mph
   21:00       0%    0.00 in   0.00 in   4.5 mph
   22:00       0%    0.00 in   0.00 in   4.1 mph
   23:00       0%    0.00 in   0.00 in   3.8 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   08-30     89.1 / 71.6 °F    0%   0.00 in  0.00 in  0.00 in  9.4 mph 10.7 mph  Partly cloudy
   08-31     84.4 / 68.7 °F    1%   0.00 in  0.00 in  0.00 in  9.8 mph 11.9 mph  Overcast
   09-01     82.1 / 62.5 °F    1%   0.00 in  0.00 in  0.00 in 10.3 mph 10.5 mph  Partly cloudy
   09-02     82.7 / 69.4 °F    1%   0.00 in  0.00 in  0.00 in 10.6 mph  9.6 mph  Clear sky
   09-03     82.5 / 70.6 °F    0%   0.00 in  0.00 in  0.00 in 11.3 mph  9.2 mph  Clear sky
   09-04     83.1 / 70.3 °F    1%   0.00 in  0.00 in  0.00 in 12.2 mph 11.2 mph  Clear sky
   09-05     82.3 / 71.5 °F   11%   0.00 in  0.00 in  0.00 in  9.4 mph  9.2 mph  Overcast
================================================================================---------------------

All data successfully fetched!
Enter City name:

/CODE]

It also allows me to type in a city name, which works for some and not others???
Like: New York

[CODE]New City: New York

[0/3] Map City to Location...
Name Query:/v1/search?name=New York&count=1
JSON Parsing failed: InvalidInput
null
Not sure why yet???
But you can also type in zip code and it will work:
Code:
New City: 1004

[0/3] Map City to Location...
Name Query:/v1/search?name=1004&count=1

====================== Map City ======================
Name:                Lausanne
latitude:            46.515999
longitude:           6.632820
Time Zone:           Europe/Zurich

[1/3] Requesting Current Weather...

====================== CURRENT WEATHER ======================
Time:                2026-08-31T04:30
Condition:           Overcast (Code 3)
Temperature:         69.8 °F
Pressure (MSL):      1018.1 hPa
Wind Speed:          7.3 mph
Wind Direction:      259°
Rain:                0.00 in
Snowfall:            0.00 in

[2/3] Requesting Hourly Forecast...

========================================== HOURLY FORECAST ==========================================
   Time        PoP%    Rain     Snow     Wind
-----------------------------------------------------------------------------------------------------
   00:00       3%    0.02 in   0.00 in  17.5 mph
   01:00       8%    0.23 in   0.00 in   1.0 mph
   02:00      15%    0.00 in   0.00 in   2.4 mph
   03:00      48%    0.00 in   0.00 in   5.7 mph
   04:00      40%    0.00 in   0.00 in   7.5 mph
   05:00      43%    0.00 in   0.00 in   6.5 mph
   06:00      50%    0.00 in   0.00 in   6.7 mph
   07:00      25%    0.00 in   0.00 in   6.6 mph
   08:00      15%    0.00 in   0.00 in   6.6 mph
   09:00      18%    0.00 in   0.00 in   6.7 mph
   10:00      10%    0.00 in   0.00 in   8.7 mph
   11:00       5%    0.00 in   0.00 in   8.9 mph
   12:00       3%    0.00 in   0.00 in   9.3 mph
   13:00       3%    0.00 in   0.00 in  10.0 mph
   14:00       0%    0.00 in   0.00 in  10.3 mph
   15:00       0%    0.00 in   0.00 in  10.3 mph
   16:00       0%    0.00 in   0.00 in   9.9 mph
   17:00       0%    0.00 in   0.00 in   9.9 mph
   18:00       0%    0.00 in   0.00 in   9.1 mph
   19:00       0%    0.00 in   0.00 in   6.8 mph
   20:00       0%    0.00 in   0.00 in   3.8 mph
   21:00       0%    0.00 in   0.00 in   2.3 mph
   22:00       0%    0.00 in   0.00 in   3.6 mph
   23:00       0%    0.00 in   0.00 in   4.1 mph

[3/3] Requesting Daily Forecast...

=========================================== DAILY FORECAST ==========================================
   Date       Max/Min Temp    PoP%   Precip    Rain    Snow    MaxWind   Gusts   Condition
-----------------------------------------------------------------------------------------------------
   08-30     80.3 / 65.9 °F   48%   0.25 in  0.24 in  0.00 in 17.5 mph 31.5 mph  Unknown
   08-31     76.4 / 63.1 °F   50%   0.00 in  0.00 in  0.00 in 10.3 mph 24.6 mph  Overcast
   09-01     77.3 / 62.1 °F    0%   0.00 in  0.00 in  0.00 in  5.9 mph 12.5 mph  Overcast
   09-02     76.6 / 66.0 °F    3%   0.00 in  0.00 in  0.00 in  8.8 mph 15.9 mph  Overcast
   09-03     79.0 / 65.3 °F    0%   0.00 in  0.00 in  0.00 in  6.0 mph  9.8 mph  Mainly clear
   09-04     84.5 / 68.0 °F    1%   0.00 in  0.00 in  0.00 in  4.7 mph  8.3 mph  Mainly clear
   09-05     85.0 / 67.0 °F    3%   0.00 in  0.00 in  0.00 in  4.9 mph  9.4 mph  Mainly clear
================================================================================---------------------

All data successfully fetched!
Enter City name:

Just playing...
If we were to make something like this as an example, we should probably put several comments in it giving credit to
things like: Your Friently AI, open-meteo.com, Not sure also mention Arduino with their Brick as a starting point...

But now just having some fun
 

Attachments

  • T41_wifi_weather_v3_plus-260830a.zip
    4 KB · Views: 20
Back
Top