Introduction: HackerBoxes 0010: Phython Pi

Picture of HackerBoxes 0010: Phython Pi

Python Pi: This month, HackerBox Hackers are exploring Single Board "Pi" Computers as well as the Python Programming Language. This Instructable contains information for working with HackerBoxes #0010. If you would like to receive a box like this right to your mailbox each month, now is the time to subscribe at HackerBoxes.com and join the revolution!

Topics and Learning Objectives for this HackerBox:

  • Setting up and working with Single Board Computers (SBCs)
  • Exploring the Python Programming Language
  • Interfacing to General Purpose I/O signals from Python
  • Porting software projects between similar SoC platforms
  • Configuring advanced Audio/Video applications on an SBC

HackerBoxes is the monthly subscription box service for DIY electronics and computer technology. We are hobbyists, makers, and experimenters.

Hack the Planet!

Step 1: HackerBoxes #0010: Box Contents

Picture of HackerBoxes #0010: Box Contents
  • HackerBox #0010 Collectible Reference Card
  • Orange Pi Lite (with WiFi Antenna)
  • Power Cable (USB to 1.7mm Barrel Connector)
  • 16GB Sandisk Class 10 microSD Card
  • Cobbler T with 40pin Ribbon Cable
  • 400 point Solderless Breadboard
  • Jumper wires for Solderless Breadboard
  • 680 ohm resistors
  • 16x2 Character LCD Module
  • 4x4 Matrix Membrane Keypad
  • Pin Header for Keypad
  • SNES Game Controller (USB)
  • USB Card Reader for microSD Card
  • HDMI Cable (1 meter)

Some other things that will be helpful:

  • Soldering Tools
  • HDMI Display (monitor or TV)
  • USB Keyboard
  • USB Mouse

Most importantly, you will need a sense of adventure, DIY spirit, and hacker curiosity. Setting up an Orange Pi Computer can be a bit more challenging than working with simple microcontroller boards. This type of hobby electronics isn't always easy, but when you persist and enjoy the adventure, a great deal of satisfaction may be derived from persevering and making things work!

Step 2: Orange Pi Lite

Picture of Orange Pi Lite

The Orange Pi Lite is an open-source single-board computer measuring only 69mm × 48mm. It runs the AllWinner H3 system-on-chip (SoC) with a quad-core ARM Cortex-A7. (datasheet)

The Orange Pi Lite has an HDMI video port driven by a Mali400MP2 GPU running at 600MHz. The GPU is capable of 4K video output.

For memory, the Orange Pi Lite has 512MB of DDR3 SDRAM and supports a TF (microSD) card up to 64GB for nonvolatile storage.

Ready to interface to pretty much anything, the Orange Pi Lite has two USB 2.0 host ports, one USB 2.0 OTG port, and a 40 Pin I/O header. It also features on-board WiFi networking and a Camera Serial Interface (CSI) for video capture up to 1080p@30fps.

The Orange Pi Lite can run Android or various Linux OS Images.

While the Orange Pi is similar to a Raspberry Pi, keep in mind that it is not exactly the same. Check out this impressive list comparing the various Single Board Computers.

Step 3: Set Up a MicroSD Card for the Orange Pi Lite

Picture of Set Up a MicroSD Card for the Orange Pi Lite

Just as a desktop or laptop computer boots up by loading operating system (OS) code from a hard drive, a single board computer (like the Orange Pi) generally boots up from a nonvolatile memory like a ROM or Flash Memory. In this case, we will set up the boot image of an OS onto a micro SD card (Flash Memory). We will be using Armbian, which is based on Debian Linux and is made specifically for ARM development boards.

From a computer, download the Armbian Image for the Orange Pi Lite. Currently, we recommend the Jessie Desktop version.

The file will download as a .7z compressed file which will have to be decompressed on your computer. If none of the decompression programs on your computer support .7z files, Google will help you find a free one for your operating system. The Armbian team suggests 7-Zip for Windows, Keka for Mac OSX, and 7z for Linux.

The decompressed file will contain a large .raw image file. This .raw file is the file that needs to be burned onto your microSD card to create the boot image for the Orange Pi Lite. Google can also help you find a free program for writing a raw image to a microSD card. The Armbian team suggests Rufus for Windows and dd for OSX or Linux.

Step 4: Booting the Orange Pi Lite

Picture of Booting the Orange Pi Lite

Once you have the boot image on the card, insert the card into the Orange Pi, hook up a keyboard, mouse, and HDMI display (monitor or TV).

Connecting Power: The Orange Pi Lite cannot be powered up through the USB OTG port. You have to apply power to the barrel connector using the supplied USB power cable. This cable should be connected to a heavier duty (2A or more) 5V USB power supply, not the smaller type that are generally used with mobile phones. Many problems encountered with Orange Pi boards are eventually traced back to using a weak or noisy power supply.

Power Button: Once everything is connected, press the tiny power button on the Orange Pi. After a few seconds, the green light will come on and a long boot process will begin. At the prompt, you will have to provide the default name and password (root, 1234) and then you will have to change it to your own password. Eventually, the GUI Desktop will appear and you can set up WiFi and use your new Orange Pi Lite just like any other SUPER TINY computer system.

Green Power LED: If the green "power LED" does not come on, the boot image on the micro SD card is not correct. It is actually code running from the card that turns the green power LED on, so if the image is not in order, it will appear as though the board is not operating. In a sense, it is not operating, because the processor is not running.

Using a DVI monitor: If you are using an HDMI to DVI cable, take a look at this tutorial and note the use of the '-d' switch for the h3disp program.

Encrypted Wi-Fi: Upon first connection, WPA sometimes does not engage. If you encounter this, go to preferences in Wicd. Under advanced settings, change the WPA supplicant to "nl80211" or to “none”. For some reason, just changing it a time or two seems to usually force WPA to engage perfectly.

Step 5: The Python Programming Language

Picture of The Python Programming Language

Python, according to Wikipedia, is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than possible in languages such as C++ or Java. The language provides constructs intended to enable clear programs on both a small and large scale. Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library.

Open up a terminal window on your Armbian desktop, and let's start by grabbing python-dev which includes the header files and a static library for building Python programs. Type this at the terminal prompt:

sudo apt-get install python-dev

The video above shows some simple examples on how to try out lines of code directly within the Python interpreter and also now to use the editor nano to create a Python program file and then run the program right on your Orange Pi.

If you wish to delve deeper into programming with Python, which of course you do, there are a great number of free Python tutorials online. You can even enroll in the MIT course "Introduction to Computer Science and Programming Using Python" through EdX.

Step 6: Orange Pi GPIO

Picture of Orange Pi GPIO

The 40 pin header on the Orange Pi Lite exposes numerous General Purpose Input/Output (GPIO) lines that can be used to get signals into and out of the processor. Note that the GPIO pins are 3.3V inputs and we must be careful not to inject 5V signals into them.

We will be using the pyH3 package, which provides methods for controlling the Orange Pi's GPIO pins, I2C and SPI buses. This package was modified from pyA20, which was created for the very similar A20 SoC. The reference information for using pyA20 is still quite useful.

From the Orange Pi Lite, follow the pyH3 link above and download the package. Extract the folder and place it as /home/pi using the file manager. Go into the terminal at that pi folder and install the package using:

python setup.py install

Now that the library is installed, cd into examples and execute this example:

sudo python blink_POWER_STATUS_PL10.py

This will blink the red LED next to the green power LED. Take a look at the code to see what is going on:

more blink_POWER_STATUS_PL10.py

Step 7: T-Cobbler for Orange Pi Lite

Picture of T-Cobbler for Orange Pi Lite

The T-Cobbler is an expansion board that connects to the Orange Pi's 40 pin GPIO connector and breaks the pins out to a breadboard-friendly format.

The T-Cobbler was originally intended to be used with the Raspberry Pi boards, so using it with the Orange Pi is a bit of a hack. There are two things to keep in mind:

1. The power and ground pins are all the same between the RPis and the OPis, but the GPIO signal names are totally different. Accordingly, the signal name markings on the T-Cobber are useful for the power and ground pins, but the signal names for the GPIO lines have different names. Check the pin chart shown here (or on the handy, collectible reference card) to identify the correct H3 / Orange Pi signal names.

2. Note that the 40 pin connector on the OPi is ROTATED 180 degrees from that of the RPi. Pay very close attention to the "pin 1 indicator" on the ribbon cable's connector, or you could short some pins out. You will find that may require some creative routing and/or origami work with the ribbon cable when connecting between the OPi and the T-Cobbler.

Step 8: LCD Display

Picture of LCD Display

You can use the T-Cobbler to interface all manner of buttons, LEDs, and so forth to the Orange Pi in a similar fashion as you might with an Arduino. For example, let's hook up a 16x2 Character LCD Display that uses the Hitachi HD44780 LCD controller chip (datasheet).

Twelve of the 16 pins on the LCD module will be used in this project. You can make a "cable" for the module using twelve of the breadboard jumper wires. Solder one pin of each jumper into the appropriate hole in the LCD module and then the other end of the jumper can be inserted into the solderless breadboard. Of course, if you have a row of single header pins and some female-to-male DuPont jumpers, you can use those instead (as shown in one of the photos).

Wire the LCD to the T-Cobber like so:

LCD <--> OPi
001 <--> GND
002 <--> +5V
003 <--> GND
004 <--> PA19
005 <--> GND
006 <--> PA7
007 <--> NO CONNECT
008 <--> NO CONNECT
009 <--> NO CONNECT
010 <--> NO CONNECT
011 <--> PA8
012 <--> PA9
013 <--> PA10
014 <--> PA20
015 <--> +5V (via resistor)
016 <--> GND

Pin 5: The R/W pin allows the LCD module to be put into read or write mode. We want to send data from the OPi to the LCD module, but we DO NOT want the LCD module attempting to send data to the OPi. Among other reasons, the 5V signals from the LCD module might damage the 3.3V pins of the H3 SoC. We can ground pin 5 to keep the LCD module from driving the data lines.

Pin 3: You can control the contrast of the display by varying pin 3 between 0V and 5V (e.g. with a potentiometer). For simplicity, grounding pin3 to 0V works well enough for a demo.

Pins 15 and 16: These are the 5V supply to drive the backlight LED. Everything seems to work fine to just hook these up to 5V and GND, but it can't hurt to include a current limiting resistor inline. One of the included 680 ohm resistors will work fine.

Once everything is wired up, try out the Python program included here to test your LCD display.

(Adapted from the Raspberry Pi version HERE.)

Step 9: Keypad Inputs

Picture of Keypad Inputs

Now that we are getting the hang of using the GPIO functions, we can read inputs from a 4x4 membrane keypad matrix.

The video example shows a Raspberry Pi setup, but working with the Orange Pi is exactly the same. We just substitute in the pyH3 GPIO package for the RPi GPIO calls Note the use of internal pullup/pulldown resistors instead of physical external resistors. This is an important technique to know.

Want a challenge? Leverage both the LCD display and the keypad to create a four-function calculator. Yes, this is overkill, but it is a great academic exercise. Can you think of anything else exciting to do with these peripherals?

Step 10: Retro Gaming and Media Center

Picture of Retro Gaming and Media Center

RetrOrangePi is a gaming and media center distribution for the Orange Pi, based on Armbian.

RetrOrangePi includes RetroArch, which is an open source, multi-platform frontend for the libretro API. It is designed to be a fast, lightweight, and portable multi-system emulator. RetroArch provides a slick, all-in-one interface on your Orange Pi for any retro game you can imagine combining emulators for video game systems like the Nintendo, Super Nintendo, Genesis, and others.

RetrOrangePi also includes Kodi, which is formerly known as the XBMC Media Center. Kodi is an award-winning free and open source cross-platform software media player and entertainment hub for digital media. It uses a 10-foot user interface designed to be a media player for the living-room, using a remote control as the primary input device. Its graphical user interface (GUI) allows the user to easily browse and view videos, photos, podcasts, and music from a harddrive, optical disc, local network, and the internet using only a few buttons.

Step 11: Pi Everywhere

Picture of Pi Everywhere

Here are some great Pi projects. Many Raspberry Pi projects either already have an Orange Pi version or can be easily adapted...

Physical Computing with Pi

Analog Inputs

Jasper (an open source platform for developing voice-controlled systems)

Sonic Pi (the Live Coding Music Synth)

Step 12: Hack the Planet

Picture of Hack the Planet

We hope you are enjoying your time working with the Orange Pi Lite single board computer. If you dig this Instrucable and would like to have a box like this delivered right to your mailbox each month, please join us by SUBSCRIBING HERE.

Please share your success in the comments below and/or on the HackerBoxes Facebook page. Certainly let us know if you have any questions or need some help with anything. Thank you for being part of the HackerBoxes adventure. Please keep your suggestions and feedback coming. HackerBoxes are YOUR boxes. Let's make something great!

Comments

AshetynW (author)2016-12-03

https://www.youtube.com/watch?v=9kzl-0xPRSk

Shows the scripting and wiring for the OrangePi to the Keypad Matrix.

AshetynW (author)2016-11-25

i am having such a difficult time with the keypad. i have no idea where i'm going wrong here. big flaw by putting up vids for RPi for beginners like myself but i've tried to translate between OPi and RPi for months now. I'm not one to give up but there is literally nothing out there for OPi to give any hints or anything. the closest i've gotten is it saying that the directory doesnt exist for pyA20.gpio when it clearly does. Can someone please assist here as i've gotten 3 hackerboxes and havent even finished this one haha

iggirl (author)2016-11-25

Working on the Orange Pi box with my 11 yr old daughter. Surprised to realize that of the several old monitors we have kicking around...none have an HDMI input! Time really does fly. I'm interesting in getting a small monitor just for the Orange Pi. Saw a few smartphone sized ones on amazon but all say they're for raspberry pi only. Can anyone recommend something similar, suitable for orange pi? Thanks!

DavidM903 (author)2016-11-21

Just getting around to playing with this one now.... I have tried numerous 5V 2A power supplies, a few different SDcards, and I am plugged directly into HDMI (no converter cables)...yet....nothing. Nothing on the monitor, and no sign of life whatsoever from the OrangePi. Is there an LED on the board itself that should come on when powered? Will that LED come on even if the image I am using is for some reason not going to boot? Any other ideas on how to get this thing to work? Thanks!

DavidM903 (author)DavidM9032016-11-22

Just following up for anyone who has similar issues....got it to work...the issue must have been how I was imaging the card.... I was using dd (command line)....didn't outwardly show any issues, but would not work. Downloaded, installed and used etcher.io and it worked flawlessly the first time...

DavidM903 (author)DavidM9032016-11-22

So I now see (further into the instructions) that the board does in fact have a green and a red LED....and I understand that neither will light unless there is a valid image to boot from on the SDcard. Played around with the board for a few more hours last night....2 different SDcards, 2 different power supplies, numerous different images....still can't get anything to give a sign of life. For the power, I am using one of the larger iPad chargers (5V 2.3A) with the supplied power cable....is that sufficient? I also have a 5V 2.1A power supply from a Buffalo wireless router I no longer use....that isn't working either....

MikeM515 made it! (author)2016-10-23

Very fun! My daughters and I put this together. Our calculator currently can only take two numbers, improvements will have to come later maybe.

demms (author)2016-10-05

Does anyone know how to enable and use the port pins' alternate functions?

munkyutk (author)2016-10-03

Has anyone gotten RetrOrangePi working on the board? I downloaded the latest image, burned it to the sd card, but it won't boot (doesn't appear to do anything actually). The armbian image from early in the steps works great.

MichaelH539 (author)munkyutk2016-10-05

@munkyutk... There was a new RetrOrangePi 2.5 image released around 26 September that is supposed to fix the WiFi issues that everyone has been experiencing. There was also a 2.5.2 image out there when I went to download the new 2.5 version, but when installed I didn't see a difference between the two. If you are still trying to use the 2.0 version, I would suggest that you skip that and download the new version. If that doesn't work, you may need to get a new micro SD card. The one I got with the box burned successfully once, but then it became a read only drive and I can't do anything with it now.

The RetrOrangePi images aren't really working the way I had hoped, so I am trying to do a fresh install of everything using the Armbian 5.20 image. I compiled and built EmulationStation successfully last night, so now I just have to get the RetroArch backend installed. Haven't had much success with that at this point. I love the EmulationStation frontend though. Much cleaner than what I have found with the Kodi addons.

MarcusR80 (author)2016-09-28

I started late opening my box(3days ago, was out of town) but when i started, the sd card would load anything or fomat. Just keeps giving me errors. So i bought another, download Armbian 5.20, unziped it with .7z program and then used eithter to burn it. Once put all the wires and loaded the sd card the green light turns on and then flashes for a minute then after a bit the red flashes along with the green, the screen just keeps on turning on and off. I have used diffrent cards and formated and burned the image countless times. I am so lost.

DesignerDavid (author)MarcusR802016-09-29

Have you tried a different monitor? I had a monitor that I was using an hdmi to dvi cable that wouldn't work at first. When I switched to a monitor with an actual hdmi input, it worked fine.

MarcusR80 (author)DesignerDavid2016-09-30

You are most definitely right it was the mother I had to use my TV and it booted right up with no problems I can't believe how much time I wasted on the same monitor thanks for the help

ruthsarian (author)2016-08-30

I was having problems connecting to my WPA2-PSK wireless network (using Armbian). What I've found works is to open up the Wicd Network Manger (click on the computer screen icon just left of the "Orange Pi Lite" text in the upper-right of the screen). Then click on the down arrow on the far right of the menu near the top of the window and select "Preferences" from the menu that appears. Then go into the "Advanced Settings" tab and under "Driver" try using "none" or "nl80211" instead of "wext" which is probably the one selected by default.

I've still had some intermittent connectivity issues, so maybe the problem is deeper, but at least I was able to run an "apt-get update" and "apt-get upgrade" to update armbian.

KyleS163 (author)ruthsarian2016-09-24

I had a problem with my WIFI not connecting to a WPA2-PSK (AES) netgear router. I would try to connect via the Wicd Network Manager and it would eventually say "Bad Password". This is a confirmation of your "first" fix. I have not had intermittent connectivity yet. As you suggested, Wicd Network Manger -> Preferences -> Advanced Settings Tab -> WPA Supplicant Driver set to "None".

Thanks for the fix!

mainegeek (author)ruthsarian2016-09-11

I tried this and my OPi system stopped shutting down properly on init 0 or init 6. File system checks on every reboot... It kept re-mounting unmounted fs. The solution for me was to start frash, choose nl80211 on desktop, and make sure locale is set to America/New_York via "dpkg-reconfigure tzdata" (It was set to Europe -- notice during apt-get upgrade msg). Once I did that it connected flawlessly on every boot. I also implemented your MAC address mod to maintain a constant DHCP address on my router.

ruthsarian (author)ruthsarian2016-09-03

I've finally got a fix for my wireless network problems. It looks like it's a bug in Wicd not waiting long enough for the connection to be established and reporting a "bad password" instead of a timeout error.

I've uninstalled Wicd and installed network-manager using these instructions:http://forum.armbian.com/index.php/topic/1775-wicd...

But how did I get online in the first place to download those files using apt-get?! I manually connected using wpa_supplicant at the command line. Here's how:

1. open up a root terminal (applications menu -> system -> root terminal)

2-A. wpa_passphrase "<ssid of your network>" > /etc/wpa_supplicant/wpa_supplicant.conf

2-B. when you hit enter you will be prompted to enter your wireless network's passphrase.

3-A. wpa_supplicant -D n180211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

3-B. the parameter after -D is the driver. try "wext" if n180211 doesn't work for you.

4. the wpa_supplicant program will run in the foreground and will manage the connection, so open a second root terminal like you did in step 1.

5. dhclient wlan0

This should get you connected to your network. Now you can run the apt-get commands in the form post I linked up above. If you run into problems, google wpa_supplicant, there's a ton of examples of how to use it to connect to your wireless network out there.

TweakGeek1 (author)ruthsarian2016-09-06

What happens when I get the 'No such file or directory' error when doing step 3-A? I've tried all different combinations of the driver name. It will initialize wpa_supplicant, but then it won't open the config file telling me there is no such file or directory. :'(

ruthsarian (author)TweakGeek12016-09-06

The file should have been created in step 2-A. If it wasn't, retry step 2-A and confirm the file was created. To write to /etc/wpa_supplicant you need root access so be sure you used a root terminal and not a regular terminal.

If the file isn't being created, run step 2-A without redirecting the output (wpa_passphrase "<ssid of your network>") and copy the output after you enter in your network's passphrase and put it into the file manually.

mainegeek (author)ruthsarian2016-09-03

Thanks. I'll need to try this since I can eventually get online messing with drivers but it disconnects, refuses to reconnect w/o fiddling. I've seen the "bad password" all too may times while I know it's correct!

DesignerDavid (author)ruthsarian2016-08-31

I couldn't get mine to connect even using the "nl80211" setting. A little more Googling turned up that using the second "none" in the same setting might work and it did for me. More information:

https://forum.xojo.com/34681-orange-pi-lite-wifi-h...

djcc2012 (author)ruthsarian2016-08-31

Many thanks! I had the same issue. I also set a static IP and it seems to be working well.

GalenS9 (author)ruthsarian2016-08-31

You might want to look into checking/setting your Locale correctly (there are lots of tutorials for the RPi on this, it should be the same for Orange Pi). I know for the Raspberry Pi, most of the Linux image locales are default set to other countries, meaning the Wifi specs are different too. I pulled my hair out for a week trying to get an RPi connected to my Wifi before I realized this. Hint: don't uninstall the default Locale, just install yours and set it.

warghuul (author)2016-09-20

I'm a total noob, I don't even know what the ".raw" file is, I don't see anything with that extension

tindel (author)warghuul2016-09-20

I'm a little late to the party but - There's not a .raw file... it's now a .img file based on 5.20 release. I can't get it to boot still :/ I tried making the drive a boot drive, I also changed it to a .raw extention.

I had some moderate success with 5.14 release (it was a .raw file), but It would fill up my 8G drive that I have. The 16G SDcard that it came with wouldn't work, and they sent me a replacement that also didn't work.

Any hints would be appreciated.

ccarrella (author)tindel2016-09-21

I had the same problem and I downloades 2 hd format programs and need to run both on the sd cards a few times but eventaly it works the two programs are.

1. http://hddguru.com/software/HDD-LLF-Low-Level-Form...

2. https://www.sdcard.org/downloads/formatter_4/

you will need to play with both of them but I have done it a few times with success.

tindel (author)ccarrella2016-09-21

The sdcard.org file keeps telling me to remove the write protection on the card. Of course, microsd doesn't have a write protection switch

The LLF is the first software package that has told me that it's successfully formated on of my chips... so that's improvement. When I put the image on the card (using Win32DiskImager) it just sits there - nothing - not even an LED. I'll try a couple more times.

ccarrella (author)tindel2016-09-21

what I would do is use the LLF first then try the other one the sd card.org does do that sometimes I suspect the SD cards they send out are either cheap fake knockoffs which has been in a lot of the comments I see on this page or they have some sort of defect which does give problems.

ccarrella (author)tindel2016-09-21

I don't use win32 I use rufus it seems to work fine for me it does take a long while to write the image though. here is a link to rufus


https://rufus.akeo.ie/

I have used this for a long time for windows .

ccarrella (author)warghuul2016-09-21

if you download Jessie desktop link: http://www.armbian.com/orange-pi-lite/

you should get a zip file use WinRAR or 7zip to extract files go to directory you extracted to and you should see 3 files

1. ambbian.txt

2. Armbian_5.14_Orangepilite_Debian_jessie_3.4.112_desktop.raw

3.Armbian_5.14_Orangepilite_Debian_jessie_3.4.112_desktop.raw.asc

file #2 is the raw file not the one that ends in asc

at this point follow guide if you need more help just ask good luck.

ccarrella (author)ccarrella2016-09-21

I just looked on the Jessie desktop page and there is a new version download it then extract the zip as above you will have 4 files in the extracted folder choose the largest file which is a img file just use rufus to build your sd card

NoviceAttempts (author)2016-09-03

Is everyone else using RetrOrangePi and getting the wifi working, or just the standard Armbian image? I'm loading the RetroOrangePi 2.0 link from release history, selecting the OPi Lite folder in the google drive. This is built on the Armbian 5.17 release and 5.13 is supposed to natively support the OPi lite wireless.

When I check out the interface configurations I'm only seeing the loopback adapter.
sudo ifconfig

When others run that command are you seeing the wlan0 adapter?
Any suggestions?

GrahamW35 (author)NoviceAttempts2016-09-04

Same here. I haven't had any luck yet either.

It may or may not be related, but when I go to the wifi settings in RetroPie, this message flashes onscreen briefly, before the GUI comes up:

using old config directory. Please migrate your files to "home/pi/.config/emulationstation" and delete the ".emulationstation" folder

djcc2012 (author)GrahamW352016-09-10

Have you gotten any farther with the RetroOrangePi wifi? My wifi using standard Armbian works fine, but I cannot connect using the RetroOrangePi system.

Is there any way to install the games without wifi?

mainegeek (author)djcc20122016-09-11

I found a solution to get the on board Wifi working with RetrOrangePi on the Opi Lite.

sudo -i

vi (or nano) /etc/modules

At the bottom insert:

8189fs

and save the file. Reboot.

MichaelH539 (author)mainegeek2016-09-18

Did you need to do anything special to get the changes to stick after reboot? When I changed the file and rebooted, the change I made is gone and the wifi will not load. I tried going into Desktop from RetrOrange Pi menu, as well as logging in directly as root from the initial log on, but no luck. Its almost like persistence hasn't be enabled on the drive.

MichaelH539 (author)MichaelH5392016-09-18

Update:

Ok, so still not able to start the wifi by performing the steps above, but I was able to manually start the wifi module by running the following commands:

sudo modprobe 8189fs

sudo ifconfig wlan0 up

once I ran those, the wifi popped in and I was able to see the networks. Still trying to figure out how to get this to stick on reboot though...

mainegeek (author)MichaelH5392016-09-18

My file system stayed persistent after edit. Maybe it is replaying the file system journal and reverting back to before the change. Maybe the sd card isn't getting unmounted properly before it reboots. I had a linux machine that did that with a dying ssd drive. Have you tried a different sd card than the included one? The included card was slow and kept hanging for me. My other cards didn't exhibit these problems.

MichaelH539 (author)mainegeek2016-09-20

@mainegeek - Thanks for the tip! It was in fact a bum micro SD card that was causing the issues. I used the 8GB SD card from the 0007 Hackerbox, and everything worked as expected. I did need to perform your fix on the new card before the WiFi would work, but other than that everything is working great!

Has anyone else invested in heat sinks for the processor and memory chips yet? Is that even needed? I was thinking this could be a pretty nice addition to the game room, but I'm worried how these things handle heat issues without heat sinks or fans. Are they robust enough to handle running the emulators for an extended period without burning out?

ruthsarian (author)2016-08-31

One issue I ran into with the Orange Pi Lite is that it was generating a partially-random MAC address on boot every time. It looks like this is a bug in Armbian. See: http://forum.armbian.com/index.php/topic/1738-opi...

The fix is to edit the file /etc/modprobe.d/8189fs.conf and enter in a new MAC address; probably change the first three byte values to "00:e0:4c" then the last 3 can be whatever you want. Now you've got an Orange Pi Lite that will have the same MAC address every time you boot it up.

Why care about the MAC address? Some wireless networks might have access control based on MAC addresses. Or your router's DHCP server might give it a different IP every time it connects because the MAC address keeps changing.

TrevorH2 (author)ruthsarian2016-09-17

OMG you just saved me from going crazy! Thanks for this tip!

DesignerDavid (author)ruthsarian2016-09-01

Ugh, I just ran into this. I was trying to use putty from another machine to remote into the OPi. I pulled up my router DHCP entries to find the ip address and there were about 10 entries from the OPI with different MAC addresses.

JohhnyB1 (author)2016-09-13

@maingeek - I really can;t get it, PLEASE PLEASE post the code. It is for my daughter, so you really won;t be doing me a disservice. She is about to give up on the whole thing. I have converted some lines to setcfg() and also seperate pullup, but I am really stuck ,so I cant help her. Thanks in advance.

mainegeek (author)JohhnyB12016-09-15

Sorry I didn't see this earlier. I was send you a PM. I didn't keep the keypad matrix code... it sort of became my 4 function calculator code so I sent you that. I hope it helps. Tell your daughter not to give up. I almost did myself a few times but once I got it figured out I found I wanted to learn more like how to draw custom characters on the LCD screen. Good luck!

DesignerDavid (author)JohhnyB12016-09-14

Check your private messages.

Neopig (author)2016-09-14

The WPA can be a huge pain for sure. It worked great via the
instructions from the guide, but on my 2nd image WPA refused to engage!
If for some reason WPA will never play nice you can do this,

Change your WiFi to an open network.

connect OrangePi to the network via zero encryption.

Access
your router and add the OrangePi MAC address to the list of allowed
devices by MAC.(It should show up under currently connected devices with
the MAC address visible.)

Re-encrypt your router to WPA or whatever you prefer.

You will still be able to connect OrangePi to the WiFi because the router was told to trust that MAC address.

~Enjoy

JohhnyB1 (author)2016-09-12

Can someone please post the link to the python code for the matrix keypad? I can't figure it out from the video

mainegeek (author)JohhnyB12016-09-13

This was an annoying part of the project for me. I had to re-watch the video a ton of times to figure it out. The code shown is using Pi libraries but the code you need should use A20 libraries noted in the instructable. You need to convert the code.to this library. Look at the examples folder from the blinking red LED and the reference link in the instrucable.

I could post you some of my code but it would honestly be a disservice to you. The code samples I kept were complete and comprehensive and I don't want to necessarily give you the answer. I spent an weekend evening (I was up LATE) figuring some of it our myself. Great thing is once I got through it, I asked myself what I can do next and went off the rails from there. Good luck!

OrangeKat (author)2016-09-02

I loaded up RetrOrangePi but it is not seeing my wifi network. I've done a few google searches but I cant find anything that might be useful. Anyone have a similar problem or have ideas? I am thinking I will have to load a different image but don't really want to do that if I can avoid it.

HackerBoxes (author)OrangeKat2016-09-02

If WiFi will not start WPA properly, go to preferences in Wicd. Under advanced, change the WPA supplicant to "nl80211" or to “none”. For some reason, just changing it a time or two seems to usually force WPA to engage.

About This Instructable

27,482views

35favorites

License:

More by HackerBoxes:HackerBox 0025: Flair WareHackerBox 0024: Vision QuestHackerBox 0023: Digital Airwaves
Add instructable to: