More updates, GPIO pins!

This commit is contained in:
Josh Mudge 2018-05-10 16:59:10 -06:00
parent 16418cd5e5
commit 48b8c8b8f2
2 changed files with 108 additions and 2 deletions

68 Normal file
View File

@ -0,0 +1,68 @@
I setup wiring on the Orange Pi but was unable to access it through a bridged internet interface.
I need another ethernet cable, I'm pausing at 11:05AM.
Resumed at 11:23 with ethernet cable, `arp` isn't giving me anything on where the Pi is.
You must plug in the ethernet to the Pi after plugging in power. Fing is a good network discovery tool. He ran fing twice before and after we plugged in the pi and ran diff on the two captures.
AJ tested using a USB cable with exposed cables, Black = ground Red = multiverse
He hooked them to the board to a resistor to the LED and it worked.
Green = Black Yellow = Red
We wired it up with pin 6 (ground and pin 2 VCC3.3V)
Check the GPIOs in the kernel
Find a GPIO already turned on.
I want to setup I followed these instructions and modified them for the Raspberry Pi
Install Node & NPM: `curl -fsSL | bash -s -- --no-dev-deps`
Download: `wget`
Decompress: `tar -xvzf download`
cd Rocket.Chat/programs/server
npm install phantomjs
npm install
cd ..
sudo ROOT_URL= \
MONGO_URL=mongodb://localhost:27017/rocketchat \
PORT=80 \
node main.js
Install MongoDB:
sudo apt-get update
sudo apt-get install -y mongodb curl graphicsmagick
I had to deal with this issue on my Raspberry Pi:
`gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory`
`sudo apt-get install dirmngr`
`sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10`
# Install Snap on Raspi
`echo "deb jessie main" > /etc/apt/sources.list.d/snapd.list`
sudo apt-key adv --keyserver hkp:// --recv B9465B841412DB3B
apt update
apt install -y snapd
sudo snap install rocketchat-server
sudo systemctl restart snap.rocketchat-server.rocketchat-mongo.service
# Haraka on ORANGE_PI
npm install -g Haraka

View File

@ -2,8 +2,6 @@ Search terms: printout, wiring diagram.
Actual diagram:
People who have done it:
@ -57,3 +55,43 @@ Adjust device default LEDs.
Raspi example of LED lighting:
Orange Pi USB process:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install python-dev -y
sudo apt-get install python-pip -y
sudo apt-get install -y python-setuptools
pip install wheel
pip install pyA20
git clone
This didn't work, BUT, the below did:
The general proceeding is described in
The GPIO pins are accessed via the sysfs file system. For enabling a specific pin it has to be exported into /sys/class/gpio/export
for pin PA1 the command would be echo 1 > sys/class/gpio/export. The pin number is calculated by the following formula :
(position of letter in alphabet - 1) * 32 + pin number
PA1 has pin number ('A' is the 1st letter ) 1, PB2 has pin number 34 ('B' is 2nd letter ), PG7 has pin number 199( 'G' is 7th letter (7-1) * 32+7=199 )
the positions on the physical header are different again, cf. the graphic below
so for enabling PG7 that is pin 40 on the physical header can be used
(# echo "out" >/sys/class/gpio/gpio5/direction first)
echo 199 > sys/class/gpio/export
Then you can run `echo "1" >/sys/class/gpio/gpio2/value` to turn it on and `echo "0" >/sys/class/gpio/gpio2/value` to turn it off.