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

Commit 8658ee0

Browse files
Changes made during testing
1 parent 722ce2f commit 8658ee0

File tree

7 files changed

+63
-5
lines changed

7 files changed

+63
-5
lines changed

Raspberry Pi Setup/Commands

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install git zsh -y && chsh -s /bin/zsh && sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
2+
wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/adafruit-pitft.sh && chmod +x adafruit-pitft.sh && sudo ./adafruit-pitft.sh
3+
4+
5+
Select Option 1
6+
Enter "Yes" on next option
7+
8+
sudo apt install python3-pip -y
9+
pip3 install pyserial
10+
11+
12+

Raspberry Pi Setup/ssh

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
2+
update_config=1
3+
country=«US»
4+
5+
network={
6+
ssid="mod_Guest5.1"
7+
psk="«your_PSK»"
8+
key_mgmt=WPA-PSK
9+
}

arduino_controller/Port Mapping.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
33

44
{{11, 12, 13}, {8, 9, 10}, {5, 6, 7}, {2, 3, 4}, {14, 15, 16}, {17, 18, 19}, {20, 21, 22}, {23, 24, 25}, {29, 30, 31}, {35, 36, 37}, {41, 42, 43}, {47, 48, 49}, {26, 27, 28}, {32, 33, 34}, {38, 39, 40}, {44, 45, 46}, {50, 51, 52}, {53, 54, 55}, {56, 57, 58}, {59, 60, 61}, {63, 64, 65}, {62, 66, 67}};
5+
6+
7+
<Up,5,Up,5,Up,5,Up,5,Up,5,Up,5,Up,5,Up,5,Up,5,Up,5,Up,5,>
8+
9+
10+
<Reset,0,Reset,0,Reset,0,Reset,0,Reset,0,Reset,0,Reset,0,Reset,0,Reset,0,Reset,0,Reset,0,>

arduino_controller/arduino_controller.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define DEBOUNCE_TIME .4
66
#define SAMPLE_FREQUENCY 20
77
#define MAXIMUM (DEBOUNCE_TIME * SAMPLE_FREQUENCY)
8-
#define NUMBER_MOTORS 3
8+
#define NUMBER_MOTORS 2
99
#define TIMEOUT 10000
1010

1111
// relay pin
@@ -27,7 +27,7 @@ bool new_data = false;
2727
Servo my_servo[NUMBER_MOTORS];
2828
// create a array of ports with the order: motor, counter, reset
2929
// int ports[NUMBER_MOTORS][3] = {{62, 66, 67}};
30-
int ports[NUMBER_MOTORS][3] = {{2, 3, 4}, {5, 6, 7}, {8, 9, 10}};
30+
int ports[NUMBER_MOTORS][3] = {{2, 3, 4}, {5, 6, 7}};
3131
// integer array that contains the direction and number of rotations a motor
3232
// needs to go
3333
int motor_commands[NUMBER_MOTORS][2] = {0};

arduino_controller/functions.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ void ProcessData()
2222
{
2323
if (motor_commands[i][0] == 0)
2424
{
25-
my_servo[i].write(100);
25+
my_servo[i].write(80);
2626
Serial.println("Reached Up");
2727
is_reset = false;
2828
}
2929
else if (motor_commands[i][0] == 1)
3030
{
31-
my_servo[i].write(80);
31+
my_servo[i].write(100);
3232
Serial.println("Reached Down");
3333
is_reset = false;
3434
}
@@ -41,7 +41,7 @@ void ProcessData()
4141
else if (motor_commands[i][0] == 3)
4242
{
4343
// Start moving pieces up
44-
my_servo[i].write(100);
44+
my_servo[i].write(80);
4545
Serial.println("Reached Reset");
4646
is_reset = true;
4747
// call reset function (still needs to be written)

sweeptest/sweeptest.ino

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include <Servo.h>
2+
3+
Servo myservo; // create servo object to control a servo
4+
Servo myservo2;
5+
// twelve servo objects can be created on most boards
6+
7+
int pos = 0; // variable to store the servo position
8+
9+
void setup() {
10+
pinMode(11, OUTPUT);
11+
pinMode(8, OUTPUT);
12+
digitalWrite(11, LOW);
13+
digitalWrite(8, LOW);
14+
myservo.attach(11); // attaches the servo on pin 11 to the servo object
15+
myservo2.attach(8);
16+
}
17+
18+
void loop() {
19+
myservo.write(80);
20+
myservo2.write(80);
21+
delay(60000);
22+
myservo.write(90);
23+
myservo2.write(90);
24+
delay(4000);
25+
myservo.write(100);
26+
myservo2.write(100);
27+
delay(60000);
28+
myservo.write(90);
29+
myservo2.write(90);
30+
delay(4000);
31+
}

0 commit comments

Comments
 (0)