July 2022.
A while ago I bought an Orange Pi. It's been sitting on a shelf for more than 2 years, I had no need to use it. Until recently, when you cannot buy a Raspberry Pi for any decent amount under $100.
My Orange was old. I looked at the silkscreen with a magnifying glass, and I downloaded the image from orangepi.org. Next, I installed BalenaEtcher and burned an SD Card.
I hooked the Orange Pi to an USB mouse and keyboard, a wired Ethernet and an HDMI display.
Powering it was challenging. It does not have the expected Micro-USB connector. It has a small barrel connector, not the standard 2.5mm. I could not find a suitable adapter in my garage. I grabbed a Sequent Card from the shelf, plugged it on top of the Orange, applier power, and sure enough I got stuff on the screen.
There was some resolution mismatch, I could not see the bottom lines. I blindly logged in with "root" and "orangepi" and if I would hit 3-4 Enter keys I could see the last prompt.
I typed ifconfig and found out the Orange installed at 192.168.1.66. I went to my computer and started a putty window at that address. The Orange Pi replied and I was in.
Next I had to install the software to test one of our cards. The card I used to power the Orange Pi was the new 3-RELAYS (40A/240V relays). I typed the first install command:
root@orangepipc:~# git clone https://github.com/SequentMicrosystems/3relind-rpi.git
and I got the first failure:
root@orangepipc:~# fatal: unable to access 'https://github.com/SequentMicrosystems/3relind-rpi.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
I googled the issue and I was told the problem was accepting the SSL certificate. As instructed, I ran the command
root@orangepipc:~# export GIT_SSL_NO_VERIFY=1
then I ran the installation command again:
root@orangepipc:~# git clone https://github.com/SequentMicrosystems/3relind-rpi.git
Cloning into '3relind-rpi'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 18 (delta 2), reused 10 (delta 0), pack-reused 0
Unpacking objects: 100% (18/18), done.
Checking connectivity... done.
Success. Next I had to figure out what I2C port is the Orange using.
I ran the command "i2cdetect", and a friendly prompt informed me:
The program 'i2cdetect' is currently not installed. You can install it by typing:
apt install i2c-tools
This was pretty clear, so I did as instructed, then I ran the command "i2cdetect -y 0". I got lucky, the Orange saw something connected on I2C 0 at address 60:
Nothing at address 1, to be sure.
I went into the "src" directory where the software was installed, and I edited the comm.c file. I looked for "/dev/i2c" string and I found it on line 48, pointing to i2c-1.
I changed it to i2c-0, saved, went one level up and recompiled:
root@orangepipc:~/3relind-rpi# sudo make installI typed "3relind" to access the card, and it responded:
root@orangepipc:~/3relind-rpi# 3relind
Usage: 3relind -h <command>
3relind -v
3relind -warranty
3relind -list
3relind <id> write <channel> <on/off>
3relind <id> write <value>
3relind <id> read <channel>
3relind <id> read
3relind <id> test
Where: <id> = Board level id = 0..31
Type 3relind -h <command> for more help
I typed the self test command to check the card, and the Orange Pi:
root@orangepipc:~/3relind-rpi# 3relind 0 testAre all relays and LEDs turning on and off in sequence?
Press y for Yes or any key for No....y
Relay Test ............................ PASS
I admired the LEDs turning on an off for a while, before pressing Y to stop the test.
At the time of this writing, both Orange and Raspberry Pi are available on Amazon. The links below might be bad after some time:
Orange Pi PC Quad Core 1GB AllWinner H3: $34.99
Raspberry Pi 3 Model B+ Board: $177.99
Just for the record, neither Sequent Microsystems nor myself are affiliated in any way, shape or form with Orange Pi.