From version 1.1.12 phyphox will directly recognize available Puck.js in the Bluetooth scan dialog and offer reading their accelerometer, gyroscope, magnetometer, light sensor, thermometer or voltage from a specific GPIO pin. Until the release of version 1.1.12 or later if you are looking for a reference implementation to modify, you can get this set of experiment configurations here:
Custom code and experiment configuration
- At the time of this writing, the puck.js supports a MTU of 53 byte, which means that any entry between config-tags and any data that you try to send back to phyphox in one go may not exceed 53 characters.
//) or you need to encode the line break as a carriage return character as we do in the examples (hexadecimal 0x0d).
- In order to use the Bluetooth UART characteristics for communication, you should disable echo (
echo(false)in the examples) and you should directly write to the characteristic to avoid splitting your string into multiple messages or some feedback from the interpreter. To do so, you can reuse the
directOutfunction from the examples.
Let us know if you need any support or if you created something cool with this.