2024-07-15
1761
#rust
MacBobby Chibuzor
142078
Jul 15, 2024 â‹… 6 min read

A complete guide to running Rust on Arduino

MacBobby Chibuzor Go, Solidity, and Haskell developer interested in the cloud native world and blockchain technology. A fanatic for technical writing and open source contribution.

Recent posts:

Implementing Infinite Scroll In React Snap Carousel

Implementing infinite scroll in React with React Snap Carousel

Making carousels can be time-consuming, but it doesn’t have to be. Learn how to use React Snap Carousel to simplify the process.

David Omotayo
Dec 13, 2024 â‹… 10 min read
React Libraries For Building Forms And Surveys

React libraries for building forms and surveys

Consider using a React form library to mitigate the challenges of building and managing forms and surveys.

Hussain Arif
Dec 11, 2024 â‹… 7 min read
Hoppscotch Vs Postman: A Guide To API Testing

Hoppscotch vs. Postman: a guide to open source API testing

In this article, you’ll learn how to set up Hoppscotch and which APIs to test it with. Then we’ll discuss alternatives: OpenAPI DevTools and Postman.

Chigozie Oduah
Dec 10, 2024 â‹… 5 min read
React Native logo over red background.

Implementing camera functionality in React Native

Learn to migrate from react-native-camera to VisionCamera, manage permissions, optimize performance, and implement advanced features.

Chimezie Innocent
Dec 9, 2024 â‹… 13 min read
View all posts

7 Replies to "A complete guide to running Rust on Arduino"

  1. > Starting a new Arduino project with avrdude

    > Starting a new project is made simpler with the cargo-generate crate. Simply run the following commands consecutively to create a new project:

    > cargo install cargo-generate

    where? run the commands *where* ?

  2. > Alternatively, you can run the command below to install the libudev-sys crate:

    ^ This tripped me up big-time! If you install libudev-sys via apt you must NOT put the dependency in cargo or it will break your build. I spent about and hour trying to fix this before I re-read the instructions and actually paid attention to the word “alternatively”.

  3. Setting the USB-Port under Windows isnt mentioned here unfortunately. I had to try this a bit and looked for how you list devices under windows:

    “`Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match ‘^USB’ } | Format-List“`
    in powershell gets you something. You have to look through your USB devices and find where the Microcontroller is located, and then put in the port like this in the cargo\config.toml file (as mentioned in the ravedude repo):

    “`runner = “ravedude uno -cb 57600 -P COM3″“`

    COM3 here is where the USB-Port showed up on my machine, uno is the target microcontroller, cb appears to be some sort of datalink speed (should be preset).

    Using ravedude it is possible to simply use cargo run and just flashing the code on the uno which is very neat.

    1. Nice one man!

      I didn’t know the part about the config.toml file, but you can find the COM port to use through the Arduino IDE or in Device Manager (built in to windows) if you want a GUI way to do it.

Leave a Reply