Arduino: Difference between revisions
imported>Milahu Created page with "== shell.nix == <syntaxHighlight lang=nix> { pkgs ? import <nixpkgs> {} }: with pkgs; mkShell { buildInputs = [ arduino #gnumake # upload with Makefile #scree..." |
m add titles to links |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
The Arduino ecosystem offers two Versions of the Arduino IDE and an Arduino CLI that both base on. | |||
The latter can be used for building Arduino projects with nix. | |||
== Arduino IDE 2.x == | |||
The Arduino IDE 2.x is available in nixpkgs as <code>arduino-ide</code> | |||
arduino | == Arduino IDE 1.x == | ||
This is the old Arduino IDE and it is available as <code>arduino</code> in nixpkgs. | |||
It is still used for many projects. | |||
} | |||
</ | === shell.nix === | ||
<syntaxhighlight lang="nix"> | |||
{ | |||
pkgs ? import <nixpkgs> { }, | |||
}: | |||
pkgs.callPackage ( | |||
{ | |||
mkShell, | |||
arduino, | |||
}: | |||
mkShell { | |||
strictDeps = true; | |||
nativeBuildInputs = [ | |||
arduino | |||
]; | |||
} | |||
) { } | |||
</syntaxhighlight> | |||
== Upload program == | === Upload program === | ||
Upload to an <code>Arduino Nano</code> board | Upload to an <code>Arduino Nano</code> board | ||
| Line 35: | Line 52: | ||
todo: make this faster | todo: make this faster | ||
=== Upload with Makefile === | ==== Upload with Makefile ==== | ||
https://github.com/sudar/Arduino-Makefile | https://github.com/sudar/Arduino-Makefile | ||
| Line 61: | Line 78: | ||
--> | --> | ||
== Arduino CLI == | |||
The Arduino CLI is available as <code>arduino-cli</code> in nixpkgs. | |||
=== Build Arduino project with Nix === | |||
Ardunio-Nix allows generating all dependencies from an Arduino project as Nix dependencies. | |||
The Arduino-Env patch makes it possible to build these Arduino project within Nix. | |||
* Arduino-Nix: https://github.com/bouk/arduino-nix | |||
* Ardunio-Env patch: https://github.com/clerie/arduino-nix/tree/clerie/arduino-env | |||
== Serial console == | == Serial console == | ||
See: [[Serial Console]] | |||
<pre> | <pre> | ||
| Line 77: | Line 109: | ||
* [[Embedded]] | * [[Embedded]] | ||
* [https://discourse.nixos.org/t/arduino-ide-environment/2086 shell.nix for Arduino IDE] | |||
* https://wiki.archlinux.org/title/Arduino | * [https://wiki.archlinux.org/title/Arduino Arduino on archlinux wiki] | ||
* https://github.com/boredom101/nixduino | * [https://github.com/boredom101/nixduino nixduino] | ||
* https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink | * [https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink Blink example] | ||
* https://vid.bina.me/tools/arduino/arduino-on-nixos/ | * [https://vid.bina.me/tools/arduino/arduino-on-nixos/ Arduino on NixOS] | ||
* [https://gist.github.com/CMCDragonkai/d00201ec143c9f749fc49533034e5009 Arduino Connection on NixOS] | * [https://gist.github.com/CMCDragonkai/d00201ec143c9f749fc49533034e5009 Arduino Connection on NixOS] | ||
* https://rzetterberg.github.io/teensy-development-on-nixos.html | * [https://rzetterberg.github.io/teensy-development-on-nixos.html Teensy development on NixOS] | ||
[[Category:Development]] | |||
[[Category:Applications]] | |||
[[Category:IDE]] | |||