Mobile phones and mobile robots have many common requirements:
- performant sensors (cameras, IMUs, LiDAR, GPS) and sensor fusion
- networking capabilities (WiFi, Bluetooth Low Energy, LTE)
- energy efficiency
What if we turned the iPhone into a robot?
-
exposes the core sensor data through iOS APIs
- Camera
- LiDAR (iPhone Pro 12+)
- IMU
-
runs WASM bytecode using statically compiled WAMR iwasm
-
communicates with ESP32 over BLE to control motors
-
TODO: enable dynamic WASM loading through LocalSend
- imports read sensor functions from iOS host
- multi-threaded application with autonomy logic
- compiled using WASI-SDK and threading
- recieves commands over BLE and uses SimpleFOC to control motors
pip install pre-commit
pre-commit- Open/build iOS app.
- Connect to bluetooth using the app
- Drive robot!
- Open HTML page in webpage folder.
- Run websocket on the websocket page of the app
- Connect to app websocket
- Drive robot!
See WASM/README.md