You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+23-18Lines changed: 23 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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
+
## <aname='Summary'></a>Summary
13
18
14
19
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!
15
20
@@ -21,9 +26,9 @@ Because the code is heavily commented, the focus of this README will be to get t
<palign="center"><i>Close up of an motor array</i></p>
23
28
24
-
#Setup
29
+
## <aname='Setup'></a>Setup
25
30
26
-
##Arduino
31
+
### <aname='Arduino'></a>Arduino
27
32
28
33
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.
29
34
@@ -42,7 +47,7 @@ There are only a few variables that can to be modified. Note that in this projec
42
47
| 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 |
43
48
ports | {array}| array that contains the mapping of port number, function, and motor number
44
49
45
-
##Raspberry Pi
50
+
### <aname='RaspberryPi'></a>Raspberry Pi
46
51
47
52
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.
48
53
@@ -67,15 +72,15 @@ There are a few variables that can be changed.
67
72
| DESIRED_STATE_FILENAME | "desired-state.csv" | CSV file we are using to store our desired state for the ceiling |
68
73
| CURRENT_STATE_FILENAME | "current-state.csv" | CSV file we are using to store the current state of the ceiling |
69
74
70
-
#Use
75
+
## <aname='Use'></a>Use
71
76
72
77
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.
73
78
74
-
##Format of the messages
79
+
### <aname='Formatofthemessages'></a>Format of the messages
75
80
76
81
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.
77
82
78
-
##Using the CVSs
83
+
### <aname='UsingtheCVSs'></a>Using the CVSs
79
84
80
85
```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.
0 commit comments