Posts

Speech to Text with DeepSpeech

Speech to text (STT) is a useful building block so I took a look at setting up DeepSpeech 0.6.1 for a test drive. My recipe for installing DeepSpeech on a Pi 4 running Raspbian Lite follows. If the Pi 4 is running the GUI desktop some packages may already be installed. sudo apt install git python3-pip python3-scipy python3-numpy python3-pyaudio libatlas3-base pip3 install deepspeech==0.6.1 mkdir ~/dspeech cd ~/dspeech curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.6.1/deepspeech-0.6.1-models.tar.gz tar xvf deepspeech-0.6.1-models.tar.gz curl -LO https://github.com/mozilla/DeepSpeech/releases/download/v0.6.1/audio-0.6.1.tar.gz tar xvf audio-0.6.1.tar.gz source ~/.profile deepspeech --model deepspeech-0.6.1-models/output_graph.tflite --lm deepspeech-0.6.1-models/lm.binary --trie deepspeech-0.6.1-models/trie --audio audio/2830-3980-0043.wav deepspeech --model deepspeech-0.6.1-models/output_graph.tflite --lm deepspeech-0.6.1-models/lm.binary --trie deepspeech-0.6.1-

M5Stack and Thermal Receipt Printer

Image
M5Stack (ESP32 with battery and display) with USB host module printing on a portable thermal receipt printer. The cable is an ordinary USB cable. The printer has a large battery so it does not take power from the M5Stack. For more details and source code see https://github.com/gdsports/print-pics

Arduino WiFi TLS 1.2

https://www.howsmyssl.com/ returns helpful information about a TLS client such as TLS version number and possible security issues. The rating "Probably Okay" is the highest possible rating. The MKR WiFi 1010 (WiFiNINA), Feather M0 with ATWIINC1500 (WiFi101), ESP32, and ESP8266 Bear SSL all support TLS 1.2 and receive the "Probably Okay" rating. For the details and source code see the git hub repo .

Arduino Due WiFi and TLS

The Adafruit Airlift ESP32 WiFi Co-Processor Breakout board works with the Arduino Due. All the crypto for TLS (formerly known as SSL) is done by the ESP32. The Airlift ESP32 is very similar to the u-blox NINA-W10 used on the Arduino MKR WiFi 1010 and the Uno WiFi Rev 2. Adafruit has their own variation of the WiFiNINA library modified to work with various Adafruit boards. The Due works using the Adafruit library with default settings. The wiring is identical to the following except substitute an Arduino Due for the Adafruit Metro. https://learn.adafruit.com/adafruit-airlift-breakout/arduino The Airlft should work with Uno, Leonardo, and Mega 2650 but I have not  tested them. Note the AVR CPUs have much less RAM than the ARM CPUs (Due, Zero, MKR series). For example, weather web sites return large amounts of data so may not work on AVR CPUs. Or the code must be more complex to extract data values on-the-fly. The Airlift can draw as much as 250 mA so be sure to account for that

Microsoft Xbox Adaptive Controller with Logitech Extreme 3D Pro Flight Stick

Image
The Logitech Flight Stick with hat switch connected to the Microsoft Xbox Adaptive Controller (XAC) is a good solution of one-handed Xbox gamers but the XAC ignores the hat switch. The joystick splitter project is one way to solve this problem using Arduino compatible boards. Enabling the hat switch makes one handed gameplay much easier. This project also changes the default button mapping so the buttons work for most games. https://github.com/gdsports/xac-joystick-splitter The project does not require modifying the joystick or the XAC. The joystick splitter works by capturing USB joystick messages from the Logitech joystick then sending them out to the two XAC USB joystick ports. The hat switch appears to the XAC as another joystick.

Using Beagle USB 12 on Ubuntu 18.04

I upgraded from Ubuntu 14.04 to 18.04 then found the Total Phase Data Center software for the Beagle USB 12 no longer works. strace shows a number of missing shared libraries. The solution is to copy the missing libraries from 14.04 into the Data Center local library directory. data-center-linux-x86_64-v6.73/lib/ libpng12.so.0 libgstinterfaces-0.10.so.0 libgstapp-0.10.so.0 libgstpbutils-0.10.so.0 libgstvideo-0.10.so.0 libgstbase-0.10.so.0 libgstreamer-0.10.so.0

Adafruit M4 (SAMD51) and Playstation 3 Controller over Bluetooth

Image
The USB Host Library for SAMD  now supports the PS3 game controller over Bluetooth. This is a port of the PS3BT code from the USB Host Shield 2.0 project. The Metro M4 is an Arduino compatible board from Adafruit. The SAMD51 is a Cortex M4 running at 120 MHz and has hardware floating point, 512 KB Flash, and 192 KB RAM. Components starting from the Metro M4 board. Adafruit Metro M4 with USB OTG to host adapter and USB Bluetooth plug USB FTDI serial board for serial console and power USB phone/tablet charger, 5V Playstation 3 controller (clone) with Bluetooth FTDI    | Metro M4 board ------  | --------- 5V      | VIN GND     | GND RXD     | TX-1  (Serial1) TXD     | RX-0  (Serial1)