This commit is contained in:
Kenwood 2022-01-04 20:14:58 +00:00
parent 2e56561f78
commit 5564f0db95
5 changed files with 25 additions and 35 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
# Backups/Generated Artifacts
_build
*.FCStd1
version.h
# Binaries
*.stl

View File

@ -7,7 +7,7 @@ PROJ := motor_controller
# What board to build for and its core
CORE ?= arduino:avr
FQBN ?= arduino:avr:mega
FQBN ?= arduino:avr:nano
# Tools, their links and versions
ARDUINO_CLI_VERSION :=
@ -84,11 +84,16 @@ requirements:
@if [ -e requirements.txt ]; \
then while read -r i ; do echo ; \
echo "---> Installing " '"'$$i'"' ; \
$(BINDIR)/arduino-cli lib install "$$i" ; \
$(BINDIR)/arduino-cli lib install $$i ; \
done < requirements.txt ; \
else echo "---> MISSING requirements.txt file"; \
fi
# Monitor the serial (debug) output.
# Requires minicom
monitor: upload
minicom -c on -D $(SERIAL_DEV) -b 115200
lint:
$(BINDIR)/arduino-lint --compliance strict

View File

@ -0,0 +1,13 @@
# Motor Controller
## Notes on custom libs
micro ros is not in the lib repo i guess? so you gotta enable unsafe libs and install from git
change `enable_unsafe_install: true` in your `arduino-cli.yaml`
use this to init this file
```
./_build/bin/arduino-cli config init
```

View File

@ -1,37 +1,8 @@
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
Serial.println(millis());
delay(1000);
}

View File

@ -1 +1 @@
micro_ros_arduino
--git-url https://github.com/micro-ROS/micro_ros_arduino.git