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:

Solving Eventual Consistency In Frontend

Solving eventual consistency in frontend

Handle frontend data discrepancies with eventual consistency using WebSockets, Docker Compose, and practical code examples.

Kayode Adeniyi
Nov 19, 2024 â‹… 6 min read
How To Use Lazy Initialization Pattern With Rust 1.80

How to use the lazy initialization pattern with Rust 1.80

Efficient initializing is crucial to smooth-running websites. One way to optimize that process is through lazy initialization in Rust 1.80.

Yashodhan Joshi
Nov 18, 2024 â‹… 5 min read
React logo on a bubbly orange background. Guide on building adaptive and responsive UIs in React Native for diverse devices.

Creating adaptive and responsive UIs in React Native

Design React Native UIs that look great on any device by using adaptive layouts, responsive scaling, and platform-specific tools.

Chinwike Maduabuchi
Nov 15, 2024 â‹… 9 min read
Enhancing Two-Way Data Binding In Angular

Enhancing two-way data binding in Angular

Angular’s two-way data binding has evolved with signals, offering improved performance, simpler syntax, and better type inference.

Alexander Godwin
Nov 14, 2024 â‹… 6 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