Call to arms | Teensy + WiFi = true

Update on our efforts:

We've sufficiently validated the Bluetooth connection on the wireless board to move forward with production.

BLE and Bluetooth Audio was validated and will be supported at release.

While the design also connects to the PCM interface of the CYW43439, which is a dedicated digital audio port. This appears targeted at voice links and not an easy implementation. Also, it's not often used - for example they are not connected on the RPi Pico W. We won't provide support for this, but if anyone is interested, they can give it a try.

Testing Details:

If interested, our tests were modeled after the Arduino port for the Pico: https://github.com/earlephilhower/arduino-pico

This is based on the BTstack library - the bluetooth stack used by the pico-sdk. It supports Bluetooth Audio, which our original port, based on NIMBLE does not. There are three Arduino libraries used in the test (note - these are all *prototypes* for testing only):

- https://github.com/gigapod/btstackTeensy
- https://github.com/gigapod/BLETeensy
- https://github.com/gigapod/BluetoothAudioTeensy

The BLE and Audio libraries depend/use the btstackTeensy library.

Not all the examples work fully (were not fully ported), but enough do to validate the design. To validate, flow control is disabled and the Bluetooth interface only runs at 115200 baud. This mostly works, but the Bluetooth audio is unable to stream audio at this speed (but the controls work).

Still a lot of work to do, and we need to decide which libraries we will launch with (BTstack as some licensing issues for "Commercial use" - but raspberry pi figured this out).

As we move forward, we'll update this thread.

-Kirk
 
@gigapod - Nice to here. I had a computer go down:cry: It took out my Windows drive completely and messed up the Linux drive which I am trying to recover right now. Fortunately I have the WIFI and Bluetooth backed up on my laptop and another desktop. Whew!!!
I did loose a lot of personnel info though that I am trying to recover. As soon as that happens I'll do some more testing...
 
@KurtE - You probably saw the above post. I did see your post on the Arduino forum about the reset delay. If you are talking about the WiFI reset would it be this:
Code:
  ///////////
  //WL_ON pin
  ///////////
  pinMode(wlOnPin, OUTPUT);  // Pull high to activate WLAN
  digitalWriteFast(wlOnPin, HIGH); // Enable WLAN
  delay(185);   <--------- This one? ------                   // Delay to allow reset to complete
 
@KurtE - You probably saw the above post. I did see your post on the Arduino forum about the reset delay. If you are talking about the WiFI reset would it be this:
Code:
  ///////////
  //WL_ON pin
  ///////////
  pinMode(wlOnPin, OUTPUT);  // Pull high to activate WLAN
  digitalWriteFast(wlOnPin, HIGH); // Enable WLAN
  delay(185);   <--------- This one? ------                   // Delay to allow reset to complete
Sorry, I don't remember, it was probably something in some sketch I was playing with 🤔
 
Just an FYI -

We got a prototype board working with flow-control (mad solder skills from @sparkfro !) and verified operation with that enabled - including Bluetooth Audio steaming music from a Teensy.

The current checkins on the above libraries reflect the modifications for flow-control. If you attempt to use a board without flow control, I would skip that last checkin.

-Kirk
 
Ok guys - i cleaned up the weather app a bit (removed extra code) so hopefully this is final updated version
 

Attachments

  • weather_display_v5-260904a.zip
    73.6 KB · Views: 41
Last edited:
SparkFun WiFi works - with some cleanup
weather app up to my wifi sketch repo:
Using 9488 here and didn't run Touch wires. Build Failed with USE_KEYBOARD - error in keyboard.
Turning that off gave use of 4 undefined "Screen" vars:
1788905729477.png
 
Using 9488 here and didn't run Touch wires. Build Failed with USE_KEYBOARD - error in keyboard.
@defragster

Did you download the latest version from the repo? From what you posted looks like you have an earlier version. Just did a double check and it compiles and runs without issue when I uncomment ILI9488..
 
download the latest version from the repo
From Github Desktop - only one branch and Fetch is current for that sketch - that INO breaks on those 4 Screen Vars hidden in ifdef USE_KEYBOARD - and the commented 9488 is missing the "9"?

My keyboard may be old - I grabbed a ZIP - just did a Github enlist will update - but no keyboard wired to test on that WiFi unit.
Updated Keyboard and removed indicated sketchbook libraries for fonts and 9488 - with USE_KEYBAORD I get this same errors:
Code:
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.cpp:39:24: error: 'ILI9488_font_t' does not name a type; did you mean 'ILI9488_t3_font_t'?
   39 | #define ILI9341_font_t ILI9488_font_t
      |                        ^~~~~~~~~~~~~~
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.cpp:61:10: note: in expansion of macro 'ILI9341_font_t'
   61 |    const ILI9341_font_t &ButtonFont) {
      |          ^~~~~~~~~~~~~~
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.cpp:60:6: error: no declaration matches 'void NumberPad::init(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, const int&)'
   60 | void NumberPad::init(uint16_t BackColor, uint16_t TextColor, uint16_t ButtonColor, uint16_t BorderColor, uint16_t PressedTextColor, uint16_t PressedButtonColor, uint16_t PressedBorderColor,
      |      ^~~~~~~~~
In file included from T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.cpp:26:
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.h:116:14: note: candidate is: 'void NumberPad::init(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, const ILI9341_t3_font_t&)'
  116 |         void init(uint16_t BackColor,uint16_t TextColor, uint16_t ButtonColor, uint16_t BorderColor,
      |              ^~~~
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.h:94:8: note: 'class NumberPad' defined here
   94 | class  NumberPad {
      |        ^~~~~~~~~
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.cpp:39:24: error: 'ILI9488_font_t' does not name a type; did you mean 'ILI9488_t3_font_t'?
   39 | #define ILI9341_font_t ILI9488_font_t
      |                        ^~~~~~~~~~~~~~
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.cpp:644:196: note: in expansion of macro 'ILI9341_font_t'
  644 | void Keyboard::init(uint16_t BackColor, uint16_t TextColor, uint16_t ButtonColor, uint16_t BorderColor, uint16_t PressedTextColor, uint16_t PressedButtonColor, uint16_t PressedBorderColor, const ILI9341_font_t &ButtonFont) {
      |                                                                                                                                                                                                    ^~~~~~~~~~~~~~
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.cpp:644:6: error: no declaration matches 'void Keyboard::init(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, const int&)'
  644 | void Keyboard::init(uint16_t BackColor, uint16_t TextColor, uint16_t ButtonColor, uint16_t BorderColor, uint16_t PressedTextColor, uint16_t PressedButtonColor, uint16_t PressedBorderColor, const ILI9341_font_t &ButtonFont) {
      |      ^~~~~~~~
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.h:357:14: note: candidate is: 'void Keyboard::init(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, const ILI9341_t3_font_t&)'
  357 |         void init(uint16_t BackColor,uint16_t TextColor, uint16_t ButtonColor, uint16_t BorderColor,
      |              ^~~~
T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad\ILI9341_t3_Keypad.h:335:8: note: 'class Keyboard' defined here
  335 | class  Keyboard {
      |        ^~~~~~~~
Multiple libraries were found for "font_Arial.h"
 Used: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\ILI9341_fonts
 Not used: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\ILI9341_t3
Using library SPI at version 1.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SPI
Using library ILI9488_t3 at version 1.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\ILI9488_t3
Using library PNGdec at version 1.1.6 in folder: T:\T_Drive\tCode\libraries\PNGdec
Using library ILI9341_fonts at version 1.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\ILI9341_fonts
Using library XPT2046_Touchscreen at version 1.4 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\XPT2046_Touchscreen
Using library QNEthernet_WIFI at version 0.38.0-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI
Using library ArduinoJson-7.x at version 7.4.2 in folder: T:\T_Drive\tCode\libraries\ArduinoJson-7.x
Using library ILI9341_t3_Keypad in folder: T:\T_Drive\tCode\libraries\ILI9341_t3_Keypad (legacy)
 
Maybe update the keypad library because as I said I copied the sketch from github desktop and it worked so hard for me to debug if I can’t see the issue.
 
Anything else out order with the Libraries Used listed in p436?
Shouoldn't be

XPT4096, ILI9488_t3, ST7796_t3 libs are installed when you install Teensy from board manager

If using the FT6236 touch you would also need the Adafruit_FT6236 lib.
 
Alcon going to add this readme to the sketch folder:
Markdown (GitHub flavored):
# Project Name: Weather Application for Teensy 4/Sparkfun WiFi Board

This application is meant to test the Sparkfun WiFI/BLE Wireless Add-on.  It also provides a useful application you can use to get the weather for any location on earth.

## 🛠️ Hardware Required
* Teensy 4.1
* Sparkfun Wireless Adapter
* ILI9488 or ST7796 display with a resistive touch screen.

## 📌 Pin Wiring Connections for Display

| Component | Arduino Pin   | Component Pin |
| :-------- | :------------ | :------------ |
| Display   | 3.3V          | VCC           |
|           | GND           | GND           |
|           | RST           | 8             |
|           | DC            | 9             |
|           | CS            | 10            |
|           | MOSI          | 11            |
|           | LED           | 5V            |
|           | MISO          | 12            |
|           | CLK           | 13            |
|           | T_CS          | 7             |
|           | T_MISO (SPI1) | 1             |
|           | T_MOSI        | 26            |
|           | T_CLK         | 27            |

## 📦 Required Libraries
* **ILI9488_t3 library** pre-installed when you install Teensy via Board Manager or via Teensyduino
* **ST7796_t3 library** pre-installed when you install Teensy via Board Manager or via Teensyduino
* **XPT2046_Touch library**  pre-installed when you install Teensy via Board Manager or via Teensyduino
* **ArduinoJson library** install via Arduino IDE Library Manager
* **ILI9341_t3_Keypad library** you will need to download my modified version which supports the ST7796 and ILI9488 displays.  This can be downloaded at https://github.com/mjs513/ILI9341_t3_Keypad/tree/ST7796_keyboard

## 🚀 How to Use
1. Clone or download this repository.
2. Open `weather_display_v5.ino` in the Arduino IDE.
3. Install the required libraries listed above if not pre-installed.
4. Config app for the display, orientation and use of diaplay keypad (optional). Keypad is optional since you can still input a new city from the serial monitor.
```c++
#define ILI488_DISP  //comment out if you want to use ST7796
#define USE_KEYBOARD //comment out if you do not want to use display keyboard
//#define printForecast
#define orientation 3  // or 1 (landscape)
```
6. Select your board and port, then click **Upload**.

Enjoy.
 
Ok guys - i cleaned up the weather app a bit (removed extra code) so hopefully this is final updated version
I don't know if anybody else ran into this using zip the file from post #431. When I compile "weather_display_v5.ino" I get this error:
Code:
In file included from /home/wwatson/Arduino/libraries/PNGdec/src/PNGdec.h:34,
                 from /home/wwatson/Arduino/weather_display_v5/weather_display_v5.ino:30:
/home/wwatson/Arduino/libraries/PNGdec/src/zutil.h:38:17: error: storage class specified for parameter 'parameter'
   38 | #  define local static
      |                 ^~~~~~
with this:
Code:
#ifndef local
#  define local static
#endif
/* since "static" is used to mean two completely different things in C, we
   define "local" for the non-static meaning of "static", for readability
   (compile with -Dlocal if your debugger can't find static symbols) */
Some how PNGdec.h is messing with QNEthernet. If I move PNGdec.h after QNEthernet.h the error goes away:
Code:
/**************************************************
* Setup Teensy Wifi                               *
***************************************************/
#include <QNEthernet.h>
#include <PNGdec.h>      // PNG decoder library by bitbank2
Anyway I am attempting to run this sketch with my SPI version of a RA8876 10" display with the resistive touch screen. This is with A T4.1, Sparkfun WIFI shield using Arduino 1.8.19 and TD 1.62.
The error went away but I still have to finish setting up the display usage. I suspect a conflict with the 'local' define of 'static...
 
I don't know if anybody else ran into this using zip the file from post #431. When I compile "weather_display_v5.ino" I get this error:
Oh shoot - been playing with this so long forgot I had to fix the pngdec library - thanks for reminding me. Here is a version of the lib that version. I think I posted about that someplace.
 

Attachments

  • PNGdec.zip
    812 KB · Views: 33
Oh shoot - been playing with this so long forgot I had to fix the pngdec library - thanks for reminding me. Here is a version of the lib that version. I think I posted about that someplace.
I have it working just before you posted :D Looks like this:

RA8876_weather_station.jpg

Picture is got a little blurry when I scaled it down to 800x600 so it would not fail to upload due to size of the file. I think I have to do some adjusting to keep the icons from clipping the day of the week. Once I moved the PNGdec.h file I only had to add the "setTextWrap()" function to the RA8876 common library and add the extra "uint16_t yr" parameter to all of the "drawRoundRect()" and "fillRoundRect()" calls. The RA8876 library defines both horizontal and vertical radius's. That was it and it worked.
Now to try and implement the touch screen and Kris's keypad library...
 
Looks like you are having some fun...

@mjs513 did some more hacking on my GIGA version, which I pulled in. Like converting some of the fonts over to work with GFX...

It is 800x480...
1788995468266.png

As well as ProtoSupply ESP32 C6 stack with ST7796 display... Still playing
 
I have it working just before you posted :D Looks like this:

Went ahead and redid it to version 1.1.6 and issued a PR to the PNGdec:


if you want my copy in the meantime its at

 
Out of curiosity I decided to try to see if wifi would work on the Teensy Micromod - note this is only for wifi - not sure about BT yet

Changed begin in the scan example to

C++:
//////////////////////////////////////////
  //Begin parameters:
  //SDIO1 (false), SDIO2 (true)
  //WL_REG_ON pin
  //WL_IRQ pin (-1 to ignore)
  //EXT_LPO pin (optional, -1 to ignore)
  //////////////////////////////////////////
  if (WIFIcard.begin(false, 5, 4, -1) == true)

It does work but note the error on the bottom

Rich (BB code):
Scan Entries = 13

**********************************************************************************************
* #          SSID                             RSSI   Channel       BSSID          Security   *
**********************************************************************************************
  1    TMOBILE-D512                          -88 dBm    4    18:A5:FF:57:D5:14    AUTO   (8)
  2    TMOBILE-5480                          -81 dBm    8    18:A5:FF:9A:54:82    AUTO   (8)
  3    Verizon_C696KD                        -86 dBm    6    24:41:FE:36:85:52    WPA2   (4)
  4    4A7E1A                                -79 dBm    6    34:98:B5:13:F2:F2    AUTO   (6)
  5    Fios-2RnJp                            -55 dBm    6    3C:BD:C5:3F:72:F2    WPA2   (4)
  6    TMOBILE-0535                          -89 dBm    2    3C:F0:83:E7:F8:A0    AUTO   (8)
  7    CyberPalin                            -42 dBm   11    48:5D:36:7D:5D:50    AUTO   (6)
  8    CyberPalin-Guest                      -45 dBm   11    4A:5D:36:7D:5D:51    WPA2   (4)
  9    Verizon_TWVGZ9                        -88 dBm   11    80:82:FE:70:2D:22    WPA2   (4)
 10    SPASERVICE                            -74 dBm    6    8C:8B:5B:D7:11:6A    WPA2   (4)
 11    LF_930_6243                           -77 dBm   11    A6:97:5C:B2:62:43    WPA2   (4)
 12    [LG_Oven]3a82                         -66 dBm   11    E2:85:4D:86:3A:82    WPA2   (4)
 13    HP-Print-4E-Officejet Pro 8610        -84 dBm    6    FC:3F:DB:6D:C3:4E    WPA2   (4)
Scan complete
Wait for next scan...


====== STARTING SCAN ======
IOCTL error: 0
Error: can't start scan

Have to power cycle - might be a timing issue????? or maybe my jumpers are just too long

UPDATE: Seems to working now.

1790268122406.png
 
Out of curiosity I decided to try to see if wifi would work on the Teensy Micromod - note this is only for wifi - not sure about BT yet

Changed begin in the scan example to

C++:
//////////////////////////////////////////
  //Begin parameters:
  //SDIO1 (false), SDIO2 (true)
  //WL_REG_ON pin
  //WL_IRQ pin (-1 to ignore)
  //EXT_LPO pin (optional, -1 to ignore)
  //////////////////////////////////////////
  if (WIFIcard.begin(false, 5, 4, -1) == true)

It does work but note the error on the bottom

Rich (BB code):
Scan Entries = 13

**********************************************************************************************
* #          SSID                             RSSI   Channel       BSSID          Security   *
**********************************************************************************************
  1    TMOBILE-D512                          -88 dBm    4    18:A5:FF:57:D5:14    AUTO   (8)
  2    TMOBILE-5480                          -81 dBm    8    18:A5:FF:9A:54:82    AUTO   (8)
  3    Verizon_C696KD                        -86 dBm    6    24:41:FE:36:85:52    WPA2   (4)
  4    4A7E1A                                -79 dBm    6    34:98:B5:13:F2:F2    AUTO   (6)
  5    Fios-2RnJp                            -55 dBm    6    3C:BD:C5:3F:72:F2    WPA2   (4)
  6    TMOBILE-0535                          -89 dBm    2    3C:F0:83:E7:F8:A0    AUTO   (8)
  7    CyberPalin                            -42 dBm   11    48:5D:36:7D:5D:50    AUTO   (6)
  8    CyberPalin-Guest                      -45 dBm   11    4A:5D:36:7D:5D:51    WPA2   (4)
  9    Verizon_TWVGZ9                        -88 dBm   11    80:82:FE:70:2D:22    WPA2   (4)
 10    SPASERVICE                            -74 dBm    6    8C:8B:5B:D7:11:6A    WPA2   (4)
 11    LF_930_6243                           -77 dBm   11    A6:97:5C:B2:62:43    WPA2   (4)
 12    [LG_Oven]3a82                         -66 dBm   11    E2:85:4D:86:3A:82    WPA2   (4)
 13    HP-Print-4E-Officejet Pro 8610        -84 dBm    6    FC:3F:DB:6D:C3:4E    WPA2   (4)
Scan complete
Wait for next scan...


====== STARTING SCAN ======
IOCTL error: 0
Error: can't start scan

Have to power cycle - might be a timing issue????? or maybe my jumpers are just too long

UPDATE: Seems to working now.

View attachment 39879
I had that sort of problem as well with the @Dogbone06 WIFI board using a breadboard and jumper wires. If the WIFI would not connect or was giving erratic results I just moved the wires and connectors. That always took care of the problem. I was very intermittent in nature.Moved it to a new breadboard and the problem went away. Just a thought. Still working on the GIGA weather app and the RA8876...
 
Back
Top