marian-vittek / raspberry-pi-dshot Goto Github PK
View Code? Open in Web Editor NEWA DSHOT protocol implementation for Raspberry Pi
License: MIT License
A DSHOT protocol implementation for Raspberry Pi
License: MIT License
This project allows to generate DSHOT protocol to control ESCs via the GPIO pins of a Raspberry Pi. It was developed and used on Raspberry Pi Zero 2, but should work on any Raspberry Pi 1/2/3/4. It does not work with Raspberry Pi 5. We have a more sophisticated implementation with less CPU consumption at https://github.com/Marian-Vittek/raspberry-pi-dshot-smi . This implementation uses busy wait and 'clock_gettime' for timing and handles DSHOT 150 protocol well. It is running on standard Raspbian OS, no RT extension is required. However, it may help if you use some hacks from https://forums.raspberrypi.com/viewtopic.php?t=245561&sid=d3b2f6139ccf00a88aa7a98db2aed7f3 to reduce interrupts on a specific core. This code is inspired by https://github.com/dmrlawson/raspberrypi-dshot. Compared to it this version: - uses "clock_gettime" instead of an empty loop. - allows multiple frames to be sent to multiple pins at once. To compile and run a simple test that spins 4 motors connected to GPIO 16, 19, 20 and 21, type make test sudo chrt -f 99 ./test 16 19 20 21 If it does not work you may need to edit 'motor-dshot.c' and adjust DSHOT_BIT_ns and/or DSHOT_T0H_ns macro.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.