Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 4103350

Browse files
Update README.md
1 parent 1ccd2fb commit 4103350

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

README.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
Table of Contents
2-
=================
3-
4-
* [Summary](#summary)
5-
* [Setup](#setup)
6-
* [Arduino](#arduino)
7-
* [Raspberry Pi](#raspberry-pi)
8-
* [Use](#use)
9-
* [Format of the messages](#format-of-the-messages)
10-
* [Using the CVSs](#using-the-cvss)
11-
12-
# Summary
1+
# Arduino Pi Ceiling Sculpture
2+
<!-- vscode-markdown-toc -->
3+
* [Summary](#Summary)
4+
* [Setup](#Setup)
5+
* [Arduino](#Arduino)
6+
* [Raspberry Pi](#RaspberryPi)
7+
* [Use](#Use)
8+
* [Format of the messages](#Formatofthemessages)
9+
* [Using the CVSs](#UsingtheCVSs)
10+
11+
<!-- vscode-markdown-toc-config
12+
numbering=false
13+
autoSave=true
14+
/vscode-markdown-toc-config -->
15+
<!-- /vscode-markdown-toc -->
16+
17+
## <a name='Summary'></a>Summary
1318

1419
Run a ceiling sculpture using a Raspberry Pi as a master and multiple Arduinos as slaves. Thanks to the way the code is written it's trivial to adapt code for any project that uses a text ui and cvs to send commands to as many Arduinos as you want!
1520

@@ -21,9 +26,9 @@ Because the code is heavily commented, the focus of this README will be to get t
2126
![Diagram](https://raw.githubusercontent.com/himalayanelixir/arduino-pi-ceiling-sculpture/master/docs/arduino-pi-ceiling-sculpture-diagram-close-up.png)
2227
<p align="center"><i>Close up of an motor array</i></p>
2328

24-
# Setup
29+
## <a name='Setup'></a>Setup
2530

26-
## Arduino
31+
### <a name='Arduino'></a>Arduino
2732

2833
In the repo you will find the Arduino code under ```arduino/arduino.ino```. Open this in the Arduino IDE or CLI and flash to the devices you are using.
2934

@@ -42,7 +47,7 @@ There are only a few variables that can to be modified. Note that in this projec
4247
| IGNORE_INPUT_TIME | 150 | once the reset is hit we ignore inputs from the encoder switch for a certain number of loops. This is done so we skip an edge when moving down one turn from a reset event |
4348
ports | {array}| array that contains the mapping of port number, function, and motor number
4449

45-
## Raspberry Pi
50+
### <a name='RaspberryPi'></a>Raspberry Pi
4651

4752
The Raspberry Pi setup is mostly automated using the script found at ```raspberry-pi/image-setup/firstboot.sh```. In the current setup I have an Raspberry connected to an Adafruit PiTFT Plus screen (<https://www.adafruit.com/product/2298>). If you aren't using the screen you can comment out those parts of the ```firstboot.sh``` script. Also you can comment out the parts where it sets up the ```/raspberry-pi/gui.py``` file for the screen.
4853

@@ -67,15 +72,15 @@ There are a few variables that can be changed.
6772
| DESIRED_STATE_FILENAME | "desired-state.csv" | CSV file we are using to store our desired state for the ceiling |
6873
| CURRENT_STATE_FILENAME | "current-state.csv" | CSV file we are using to store the current state of the ceiling |
6974

70-
# Use
75+
## <a name='Use'></a>Use
7176

7277
Once the Arduinos are flashed and the Raspberry Pi is setup you plug the Arduinos into the Raspberry Pi. When you SSH into the Raspberry Pi using the pi user ```controller.pi``` will automatically run. If you close the program running ```controller``` in the terminal will start the program up again.
7378

74-
## Format of the messages
79+
### <a name='Formatofthemessages'></a>Format of the messages
7580

7681
The messages between the Raspberry Pi and the Arduinos are formatted in strings. For example the string ```<Up,1,Down,1>``` will tell the Arduino to move motor 0 up one turn and move motor 1 down 1 turn. You can even try this using the serial monitor in the Arduino IDE.
7782

78-
## Using the CVSs
83+
### <a name='UsingtheCVSs'></a>Using the CVSs
7984

8085
```controller.py``` uses two CSVs to figure out what messages to send to the Arduinos. ```desired-state.csv``` contains a CVS which is used by the user to specify how many turns from 0 they want each motor to be at.
8186

0 commit comments

Comments
 (0)