Hackaday | Millenium Falcon HID: Get Cohesion to Communicate to Teensy

Here is one that proves a venture can transcend blinking LEDs and dumping large chunks of information onto a serial console. The ones practices are wonderful for some, however [dimtass] has discovered a extra chic hack for a extra civilized age. His 3-D Millennium Falcon fashion will get orientation information from his IMU as an an HID software.

The concerned is an MPU6050 6-axis sensor this is interfaced with a Teensy 3.2 board. [dimtass] paperwork his option to calibrating the IMU going slightly additional via the usage of a Python script to generate offsets. We now have advocated the usage of Jupyter notebooks previously and it is a just right instance of Jupyter plotting the knowledge and visualizing the impact of the offsets in a 2d go.

When in motion, the Teensy reads IMU information and sends it over a USB RAW HID interface. For the uninitiated, HID transfers are extra dependable than USB CDC transfers (digital serial port) as a result of they use smaller information chunks in step with tournament/transaction and normally do not require particular drivers At the pc aspect, [dimtass] has written a small software that will get the IMU values over the RAW HID after which supplies it to the visualization software.

A 3-D Millennium Falcon fashion is rendered in Cohesion, the preferred open supply sport building engine. Even if Cohesion has an API, this actual method is extra OS explicit the usage of a shared-memory methodology. The HID software writes to a document (/tmp/hid-shared-buffer) which is then learn via Cohesion to make orientation adjustments to the rendered fashion.

[dimtass] supplies a number of main points at the equipment used to convey his venture to existence and it may be a super place to begin for extra initiatives that want interfacing sensors with a visualization gadget. Now we have noticed techniques to flip an individual’s head right into a joystick and if you want a deeper dive into Cohesion, glance no additional.

by way of https://appmarsh.com/2KBMhhr