Skip to content

jamisonderek/flipper-zero-sao

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

flipper-zero-sao

Description

This project is for using the Flipper Zero to debug SAO devices. We use JavaScript on the Flipper Zero to interact with the various SAO devices. JavaScript is 500-800 times slower than C, but it has the advantage that we can update our script without needing a computer to compile our code!

You can update scripts using a bluetooth connected mobile phone (run the Flipper Zero mobile app and choose Options/File Manager/ext/apps/Scripts/SAO), or using a text editor directly on the Flipper Zero. This is especially useful for quickly iterating or making minor tweaks to existing scripts.

You can use BadgeLife SAO Debug Tool from Thomas Flummer! I recommend adding a jumper between pins 3 and 5 so that SPI output can be used. I validated that SK9822 LEDs can be controlled when pin 3 and 5 are connected together.

Features

  • I2C
    • Connect SDA to Flipper pin 15
    • Connect SCL to Flipper pin 16
  • SPI OUTPUT
    • Connect USER1 (aka GPIO1) to Flipper pin 2 (aka MOSI)
    • Connect USER2 (aka GPIO2) to Flipper pin 5 (aka SCK)
  • GPIO
    • Connect USER1 (aka GPIO1) to Flipper pin 2
    • Connect USER2 (aka GPIO2) to Flipper pin 5

Supported modules:

  • AS1115 - I2C display driver for Spiral Matrix Petal
  • AT24C32 - 32K I2C EEPROM
  • ATtiny816 - As configured in Touchwheel app. :)
  • LIS2DH12 - Accelerometer
  • MCP23017 - 16-bit GPIO expander
  • NXP NT3H2211W0FT1 - NFC module
  • SK9822 - Addressable RGB LEDs
  • WS2812B - Addressable RGB LEDs (required rebuulding the firmware)

Future modules:

  • SSD1306 - OLED display (under development)
  • LPUART
    • Not encouraged, multiple SAO may have issue.
    • Uses same pins as I2C

Installation

  • Install the latest dev branch of Momentum firmware.
  • Copy the SAO folder to your Flipper Zero (e.g. SD Card/apps/Scripts folder).
  • NOTE: For controlling WS2812B you will need to build custom Momentum firmware. I hope to submit a PR to Momentum in late November 2024, so that you won't have to do this step. Please see the custom firmware section below!

Running Samples

Custom Firmware

NOTE: These steps are only required if you want to control WS2812B RGB LEDs!

First clone and build the Momentum firmware:

(NOTE: If you are running a Windows Command Prompt, use fbt instead of ./fbt)

git clone --recursive https://github.com/next-Flip/Momentum-Firmware.git
cd Momentum-Firmware
./fbt vscode_dist
./fbt updater_package

Next, overlay the files from the js_app folder in this repository to the Momentum firmware files in the applications/system/js_app folder.

Make sure your Flipper Zero is plugged in to your computer, and that qFlipper and lab.flipper.net are not running. Then the following command to build and deploy the firmware to your Flipper Zero:

./fbt COMPACT=1 DEBUG=0 FORCE=1 flash_usb_full 

Support

Feel free to reach out to me on Discord. My username is @codeallnight and you can also tag me on any of the Flipper Firmware servers.

Support my work by buying me a coffee!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published