ESP32/BC24 Demo Software Released

ESP32/BC24 Demo Software Released

The BC24 currently comes programmed with Version 005 (as of 6/30/2019)  of the demo software.   The Version 005 initially on the BC24 only supports the #1 SmartConfig IP Number provisioning (documented below) system from your AP device.

Version 008 (Documented here) supports three version of getting an IP address (Provisioning) to connect to the Internet.

You can download the latest version of the Demo software here:

https://github.com/switchdoclabs/SDL_ESP32_BC24DEMO

 

What is the BC24?

BC24The BC24 is a flexible way to display all sorts of data while being able to communicate with other devices and the Internet.   It is a board that you can plug in your sensors and create new things!

The BC24 consists of three major parts:

1) Dual CPU ESP32 Central Processor with WiFi and Bluetooth

2) The 24 RGBW Programmable LED Pixel Circle

3) No Solder Grove Connectors for expansion!

The RGBW (Red Green Blue White) Pixels are completely programmable (millions of colors) and includes a bright white LED to give you pure warm white.   These programmable pixels are 100% compatible with NeoPixels.

The Grove connectors allow you to easily and safely connect hundreds of sensors (and more Pixel strips if you want!) with no soldering.   And you CAN’T plug them in backwards.   Fewer boards in the Box of Death.

You can get the BC24 here.

Requirements for Compiling

In order to install the Arduino IDE with support for the ESP32 on the BC24, please follow the tutorial here:

Installing ESP32 / BC24 Support in the Arduino IDE

Select the Adafruit ESP32 Feather under tools

If you get a “\SDL_ESP32_BC24DEMO\SDL_ESP32_BC24DEMO.ino:69:21: fatal error: TimeLib.h: No such file or directory”

Go to this link github.com/PaulStoffregen/Time and download the .zip file. Then, in the IDE, go to Sketch>Include Library and click on Add .ZIP Library… In your file download area, you should be able to find the Time-Master.zip. Click on it and Open. It will install the Time.h required for the compilation of the sketch. Try to compile. If you get a repeat error, ,then close the IDE and restart it. Then re-compiling should work.

Plug a USB Micro to USB connector into your computer (the one with the power supply will work) to establish the connection.

Description of the Demo software

We have four goodies for you right out of the box.

The Demo program has four different modes:

– Rainbow Display Demo (Mode 1)
– Monitor the Dow Jones Average Live! (Mode 2)
– Blue Theater Chasing Circle (Mode 3)
– Digital LED Clock (synced with NIST clocks for high accuracy) (Mode 4)

 

Note:  The mode button is sometimes pushed during testing so your system may not start with Mode 1.  The BC24 remembers what mode it was in when last shut down.

 

Version History

  • – Version 008 July 11, 2018: Fixed ClockTimeOffsetToUTC Bug so it is properly read and stored in preferences. You will need to hold MODE down during Reset to get the preferences to start recording the default ClockTimeOffsetToUTC. Change #define DEFAULTCLOCKTIMEOFFSETTOUTC -25200 for your time preferences. This will be replaced with a REST command in a new version
  • – Version 007 June 30, 2018: Added Kludge to fix latest ESP32 SDK problem
  • – Version 006 June 18, 2018: Added multiple methods for getting IP addresses from WiFi – Provisioning
  • – Version 005 May 15, 2018: Built in Version on first production of Boards for Kickstarter. Only supports SmartConfig for WiFi

 

Want to Reset the Board?

Hold Mode button down while you press the Reset button.   Clears the WiFi connection and resets the mode to 1.

The program remembers which mode you pushed last. Whne you push the mode button, it may take a while before the software recognizes the button push, but it will. Then it will display the mode number (one green light) and you are now in the new mode. Note: Mode 2 and Mode 4 requires a WiFi connection. FIVE red lights will flash if you go to mode 2 or 4 without a WiFi Connection.

Startup

On Startup the software looks for a previously set WiFI connection. If it finds it then, you will see three green lights flash. If it doesn’t find the WiFi or has never been connected to a WiFi, then it starts though the WiFi detection sequence.   Version 006 provides three ways of connecting.

WiFi Connection Sequence – Provisioning

– SmartConfig
– WPS Button on AP
– Local AP on ESP32 (192.168.4.1)

Note: This was developed for the BC24 ESP32 Based 24 RGBW Pixel LED Board

#1 SmartConfig

This method uses the TI method of provisioning, called SmartConfig.

Here is a good reference to SmartConfig:
https://community.particle.io/t/smart-config-the-missing-manual-now-available/442

In order to do SmartConfig, you need a smartphone or tablet (Android or iOS) that is connected to your WiFi network (which you want ESP32 to connect to) and install a special application.

On this application, you just supply the ssid and password of WiFi network so that the application can use, encode them and then broadcast (via UDP) encoded ssid and password (under packet format) over the air.  When this software is being run, the ESP32 (with the SmartConfig software loaded) will capture these packets, decode the ssid and password and use them to connect to Wifi network.

After connecting to WiFi, the ESP32 will use mDNS to multicast a message to the application to notify that it has successfully connected to WiFi.

The source code of special application implementing the SmartConfig  is supplied by Espressif. You can download  it at:
https://github.com/EspressifApp/EsptouchForAndroid
https://github.com/EspressifApp/EsptouchForIOS


This application is also available on App Store for both Android and iOS devices.

– For Android, this application is available under name “IOT_Espressif” or another application “ESP8266 SmartConfig” (this is for ESP8266 but you can use it for ESP32):

https://play.google.com/store/apps/details?id=com.cmmakerclub.iot.esptouch
https://play.google.com/store/apps/details?id=com.espressif.iot

– For iOS, this application is available under name “Espressif Esptouch”:
https://itunes.apple.com/us/app/espressif-esptouch/id1071176700?mt=8

 

 

Color sequence

Default Time: 15 seconds to hit Smart Config on app, 30 seconds timeout on response
– Three White Lights
– Three Red on failure
– Three Green on success

#2 WPS Button on AP

Wi-Fi Protected Setup (WPS; originally, Wi-Fi Simple Config) is a network security standard to create a secure wireless home network.

Introduced in 2006, the goal of the protocol is to allow home users who know little of wireless security and may be intimidated by the available security options to set up Wi-Fi Protected Access, as well as making it easy to add new devices to an existing network without entering long passphrases.

This library will wait 60 seconds (in the example) for the WPS packets to be recieved by the ESP32.

A major security flaw was revealed in December 2011 that affects wireless routers with the WPS PIN feature, which most recent models have enabled by default.

This software does not use the PIN feature.

Color sequence

Default Time: 30 seconds timeout if no WPS button sent from AP
– Three White Lights
– Two White Lights during search
– Two Red Lights on failure
– Two Green on success

#3 Local AP (192.168.4.1)

For the third provisioning method, the ESP32 is set up as an access point (192.168.4.1) – look at your list of WiFi APs on your computer when it is running. A small web server is started that will allow you to select the AP that you want the ESP32 to connect to and then you can enter the password for the access point.

It runs for 60 seconds by default.

The Access Point will be of a form BigCircl24 – XXXX, where XXXX will vary.

Color sequence

Default Time: 60 seconds timeout if No completed Webform returned
– One Blink of single White Light
– One Blinking White Light during AP page active
– One Red Light on failure
– One Green on success

 

Remember that all of these features may fail and have to be repeated. Nature of the beast.

Software Notes

Reset to Default state

Hold the Mode button down while you press and release Reset – erases stored information

Software Defines

The two general defines in the example are:
– BC24:
Define BC24 if you are using a BC24 ESP32 based device.

– BC24DEBUG:
Define BC24DEBUG (by default in the example it is defined) to see lots of debugging information which can help resolve problems and issues.