Flipper Zero: Extend JavaScript - add VGM & Sound support!

Published: 13 April 2024
on channel: Derek Jamison
871
33

Leave a comment about what integrations (Infrared? Temperature? etc.) you are interested in seeing for the Flipper Zero!
In this video we look at two techniques to extend JavaScript to unlock the full potential of your Flipper Zero. JavaScript is a powerful programming language for the Flipper Zero but has limited number of modules currently available. We look at how you can access new modules to the Flipper, enabling new powerful scripts to be written. We create then use two new modules to make a script that plays different tones (speaker) when the Flipper is rotated (using the Video Game Module [vgm]).

We will write one new module in JavaScript (using furi_hal_xxx APIs to expose a new speaker module) and we will write the other in C (exposing a sensor library for VGM that isn't part of the firmware). We will learn about the trade-offs of the two techniques.

One a module is created; JavaScript developers can use the new libraries just like they were built into the language and not needing all the low-level API details.

Join the discord server (conversations and giveaways):   / discord  

Support this channel:
Option 1. Like, Subscribe and click the Bell (to get notified)
Option 2. https://ko-fi.com/codeallnight (donate $3 via PayPal or Venmo)
Option 3. Click the "Thanks" button on YouTube.
Option 4. Purchase a FlipBoard (I get a portion of the sale). https://github.com/MakeItHackin/FlipB...

You can find the code from this video here:
https://github.com/jamisonderek/flipp...

Also join momentum Discord server [see the script-sharing channel]:
  / discord  

Timeline:
0:00 - Introduction
0:42 - a_demo.js
1:24 - ffi technique (speaker_api.js)
4:05 - c module (js_vgm.c)
9:42 - flash USB w/resources
11:23 - JavaScript app (tone_rotate.js)
13:20 - Summary


Watch video Flipper Zero: Extend JavaScript - add VGM & Sound support! online without registration, duration hours minute second in high quality. This video was added by user Derek Jamison 13 April 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 871 once and liked it 33 people.