summaryrefslogtreecommitdiff
path: root/README.md
blob: 18ec6bc029e373287a818f2211aef8372da04a7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Active Drag System (ADS)
This is the main codebase for Rocketry at Virginia Tech's Active Drag System, also known colloquially as the ADS, for the 2023-2024 competition year. It runs primarily on a BeagleBone Black, and its goal is to autonomously control the ADS' deployment during flight.

## BUILD
```shell
vagrant up
vagrant ssh
cmake /vagrant
cmake --build .
```

## BUILD Alternative (Windows)
Enable WSL2 in windows
Install Ubuntu 22 LTS from Windows Store
```shell
sudo apt update && upgrade
sudo apt install build-essential cmake valgrind crossbuild-essential-armhf
sudo apt install musl musl-tools
```
Then to actually build:
```shell
cmake -B build
cmake --build build/
```

## BUILD Alternative (Mac)
```shell
brew install arm-linux-gnueabihf-binutils
# This installs just the arm library, you can remove x86_64 if you want those too
brew install FiloSottile/musl-cross/musl-cross --without-x86_64 --with-arm-hf
```
To check if installed correctly run:
```shell
ls /opt/homebrew/bin | grep "musl"
```
you should see:
```shell
arm-linux-musleabihf-gcc
arm-linux-musleabihf-g++
```

## RUN
```shell
scp -r src/ads [email protected]:~/
ssh [email protected]
./ads
```

## TEST
```shell
scp -r test/test_ads [email protected]:~/
ssh [email protected]
./test_ads
```

## GPIO Pins
The GPIO number is calculated by taking the GPIO chip
number, multiplying it by 32, and then adding the offset. For example,
GPIO1_12 = (1 × 32) + 12 = GPIO 44.

```shell
/sys/class/gpio/gpio44 = GPIO1_12
```