Arduino: Difference between revisions
Appearance
imported>Milahu Created page with "== shell.nix == <syntaxHighlight lang=nix> { pkgs ? import <nixpkgs> {} }: with pkgs; mkShell { buildInputs = [ arduino #gnumake # upload with Makefile #scree..." |
(No difference)
|
Revision as of 19:36, 8 November 2022
shell.nix
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
buildInputs = [
arduino
#gnumake # upload with Makefile
#screen # serial console
];
}
Upload program
Upload to an Arduino Nano
board
time \ arduino --board arduino:avr:nano --port /dev/ttyUSB0 --upload Blink.cpp Loading configuration... Initializing packages... Preparing boards... Verifying... Uploading... real 0m28.913s
Serial console
screen /dev/ttyUSB0 # set baud rate. default is 9600 screen /dev/ttyUSB0 9600
see also: https://wiki.archlinux.org/title/GNU_Screen
see also: https://wiki.archlinux.org/title/Working_with_the_serial_console