Compare commits
7 Commits
feat/motor
...
cadc2b0c6a
| Author | SHA1 | Date | |
|---|---|---|---|
| cadc2b0c6a | |||
| a234275422 | |||
| c67bcdc484 | |||
| 61d77870a0 | |||
| 598e84603f | |||
| 3c0ecdd98c | |||
| 041bde458c |
13
README.md
13
README.md
@@ -1,7 +1,14 @@
|
||||
# To install on robot
|
||||
|
||||
```
|
||||
git clone <url>
|
||||
cd lewis-crawler/crawler_software/raspberry_pi
|
||||
make install?
|
||||
git clone https://kitsunehosting.net/gitea/Kenwood/lewis-crawler /srv/crawler
|
||||
cd /srv/crawler/crawler_software/raspberry_pi
|
||||
make install
|
||||
```
|
||||
|
||||
# Updating
|
||||
|
||||
```
|
||||
cd /srv/crawler
|
||||
git pull
|
||||
```
|
||||
|
||||
@@ -1,70 +1,38 @@
|
||||
### DISCLAIMER
|
||||
### This is an example Makefile and it MUST be configured to suit your needs.
|
||||
### For detailed explanations about all the available options,
|
||||
### please refer to https://github.com/sudar/Arduino-Makefile/blob/master/arduino-mk-vars.md
|
||||
# A makefile for building the robot's slave software
|
||||
# Uses arduino-cli
|
||||
#
|
||||
# Kitsune Scientific 2021
|
||||
|
||||
### PROJECT_DIR
|
||||
### This is the path to where you have created/cloned your project
|
||||
PROJECT_DIR = $(shell dirname $(shell pwd))
|
||||
# What board to build for and its core
|
||||
CORE ?= arduino:avr
|
||||
FQBN ?= arduino:avr:nano:cpu=atmega328old
|
||||
|
||||
### ARDMK_DIR
|
||||
### Path to the Arduino-Makefile directory.
|
||||
ARDMK_DIR = $(PROJECT_DIR)/Arduino-Makefile
|
||||
# What port to build on
|
||||
ifndef SERIAL_DEV
|
||||
ifneq (,$(wildcard /dev/ttyUSB0))
|
||||
SERIAL_DEV = /dev/ttyUSB0
|
||||
else ifneq (,$(wildcard /dev/ttyACM0))
|
||||
SERIAL_DEV = /dev/ttyACM0
|
||||
else
|
||||
SERIAL_DEV = unknown
|
||||
endif
|
||||
endif
|
||||
|
||||
### ARDUINO_DIR
|
||||
### Path to the Arduino application and resources directory.
|
||||
ARDUINO_DIR = /usr/share/arduino
|
||||
all: requirements build upload
|
||||
|
||||
### USER_LIB_PATH
|
||||
### Path to where the your project's libraries are stored.
|
||||
USER_LIB_PATH := $(realpath $(PROJECT_DIR)/lib)
|
||||
build: requirements crawler_slave.ino
|
||||
arduino-cli core install $(CORE)
|
||||
|
||||
### BOARD_TAG & BOARD_SUB
|
||||
### For Arduino IDE 1.0.x
|
||||
### Only BOARD_TAG is needed. It must be set to the board you are currently using. (i.e uno, mega2560, etc.)
|
||||
# BOARD_TAG = mega2560
|
||||
### For Arduino IDE 1.6.x
|
||||
### Both BOARD_TAG and BOARD_SUB are needed. They must be set to the board you are currently using. (i.e BOARD_TAG = uno, mega, etc. & BOARD_SUB = atmega2560, etc.)
|
||||
### Note: for the Arduino Uno, only BOARD_TAG is mandatory and BOARD_SUB can be equal to anything
|
||||
BOARD_TAG = mega
|
||||
BOARD_SUB = atmega2560
|
||||
arduino-cli compile -b $(FQBN) crawler_slave
|
||||
|
||||
### MONITOR_PORT
|
||||
### The port your board is connected to. Using an '*' tries all the ports and finds the right one. Choose one of the two.
|
||||
MONITOR_PORT = /dev/ttyUSB*
|
||||
# MONITOR_PORT = /dev/ttyACM*
|
||||
upload: requirements crawler_slave.ino
|
||||
arduino-cli upload -b $(FQBN) crawler_slave -p $(SERIAL_DEV)
|
||||
|
||||
### MONITOR_BAUDRATE
|
||||
### It must be set to Serial baudrate value you are using.
|
||||
MONITOR_BAUDRATE = 115200
|
||||
|
||||
### AVR_TOOLS_DIR
|
||||
### Path to the AVR tools directory such as avr-gcc, avr-g++, etc.
|
||||
AVR_TOOLS_DIR = /usr
|
||||
|
||||
### AVRDUDE
|
||||
### Path to avrdude directory.
|
||||
AVRDUDE = /usr/bin/avrdude
|
||||
|
||||
### CFLAGS_STD
|
||||
CFLAGS_STD = -std=gnu11
|
||||
|
||||
### CXXFLAGS_STD
|
||||
### You can choose wich ever you like
|
||||
# CXXFLAGS_STD = -std=gnu++11
|
||||
CXXFLAGS_STD = -std=gnu++17
|
||||
|
||||
|
||||
### CPPFLAGS
|
||||
### Flags you might want to set for debugging purpose. Comment to stop.
|
||||
CXXFLAGS += -pedantic -Wall -Wextra
|
||||
LDFLAGS += -fdiagnostics-color
|
||||
|
||||
### OBJDIR
|
||||
### Don't touch this!
|
||||
### This is were you put the binaries you just compile using 'make'
|
||||
CURRENT_DIR = $(shell basename $(CURDIR))
|
||||
OBJDIR = $(PROJECT_DIR)/build/$(CURRENT_DIR)/$(BOARD_TAG)
|
||||
|
||||
### path to Arduino.mk, inside the ARDMK_DIR, don't touch.
|
||||
include $(ARDMK_DIR)/Arduino.mk
|
||||
requirements:
|
||||
@if [ -e requirements.txt ]; \
|
||||
then while read -r i ; do echo ; \
|
||||
echo "---> Installing " '"'$$i'"' ; \
|
||||
arduino-cli lib install "$$i" ; \
|
||||
done < requirements.txt ; \
|
||||
else echo "---> MISSING requirements.txt file"; \
|
||||
fi
|
||||
|
||||
1
crawler_software/arduino/crawler_slave/requirements.txt
Normal file
1
crawler_software/arduino/crawler_slave/requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
Servo
|
||||
18
crawler_software/raspberry_pi/Makefile
Normal file
18
crawler_software/raspberry_pi/Makefile
Normal file
@@ -0,0 +1,18 @@
|
||||
# A makefile for installing the robot's python
|
||||
# software and setting it up.
|
||||
#
|
||||
# Requires sudo
|
||||
#
|
||||
# Kitsune Scientific 2021
|
||||
|
||||
all: install
|
||||
|
||||
upload: crawler.service
|
||||
sudo cp crawler.service /etc/systemd/system/crawler.service
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
sudo systemctl enable crawler.service
|
||||
sudo systemctl start crawler.service
|
||||
|
||||
sudo systemctl status crawler
|
||||
Reference in New Issue
Block a user