Camera building and trouble shooting
Building the AIY Camera
To build the camera, you need the AIY Google Vision Kit and the extra microSD card included in the small box of the package we send you.
Have some space and take your time 🙂 Ready?
Follow these detailed instructions steps 1 - 66
Pay particular attention to the orientation of the ribbon cables, make sure they face the right way and are pushed in all the way before closing the clamp. Do not do step 66 and insert the microSD card that is in the set.
We need to provide the Raspberry Pi in the camera with the name and the password for the WiFi connection. Use the same WiFi you computer or laptop is connected to. Here are the steps
Find the microSD card in the small box. It is inside a bag with an ORCSGirls Sticker
Use the microSD card adapter and insert the microSD card
Insert the adapter in a USB port on your computer or laptop (you might need an adapter is you do not have a 'big' USB-A port)
The card should show up as a drive called Boot on you computer
Visit the webpage https://play.orcsgirls.org/Pi/wifi.php and enter your WiFi network name (SSID) and password. Make sure everything is spelled correct. Click Download.
Copy the download file wpa_supplicant.conf to the microSD card (Drive Boot)
Eject the microSD card drive
Remove the adapter and the microSD card
Insert the microSD card into the Raspberry Pi (similar to step 66 we skipped earlier)
Follow these instructions to power up the camera and let it boot. Make sure you see the green light blinking after a few seconds indicating activity. If it successfully starts up, you will hear a beep and the green LED in the front lights up - be patient, the first boot might take a minute or two.
If all starts up well, you hear a sound. After that if the camera detects a face, the button on top turns blue. If it detects joy, the color changes. If you camera does this - success you successfully build the AIY camera 🥳
Connecting to the camera
If the camera successfully connected to the WiFi, you should be able to access it using the link http://orcspi-vis.local:4664 and see the video stream with a box around detected faces and a joy score from your camera. If you cannot reach the site, check the WiFi trouble shooting below.
For those who cannot wait, the link http://orcspi-vis.local:5555 will connect you to Jupyter 😎
You can also connect to the camera using ssh. On Mac and Window you should have a terminal program. Open is and enter this command ssh email@example.com - answer yes to the first finger print question, then enter the password (same as last class, Slack me if you need it). You should see a command prompt for your Raspberry Pi where you can enter commands.
The Raspberry Pi is a 'real' computer and just like a laptop or computer it needs to be shutdown before turning off power. Many times just turning it off will be ok, but it has the (small) danger of damaging the file system on the microSD card and not booting again. The proper way to shutdown is
Open a terming and connect to the Raspberry Pi (using ssh)
Enter the command sudo shutdown now
Wait for the green light on the Pi to stop blinking and turn off
Turn off power
If the link above does not connect you to your camera, here are a few trouble shooting steps. Try them in order and check after every step if connecting starts working.
Make sure the Pi and your computer are on the same WiFi network.
Make sure you copied the file wpa_supplicant.conf with the correct WiFi credentials on the microSD card before inserting it into the Pi. If you are not sure, turn the Pi off and remove the card. Use the adapter and insert it in to the laptop or computer. Note the file will not be on there, since the Pi removes it after booting. Create a new wpa_supplicant.conf using https://play.orcsgirls.org/Pi/wifi.php and copy it on the microSD card. Open the drive (Boot) on your computer and verify the file is there. Eject and remove the microSD card and re-insert it into the Raspberry Pi. Boot up - wait a few minutes and try to connect.
Some networks do not recognize '.local' internet addresses. In this case we need to find the IP address of the Raspberry Pi. Since if does not have a display, we need to look for it. Ask a parent if they have a tool to show all the computers on your home WiFi (many times logging into the WiFi router will show that) - find orcspi-vis and note the IP address (often something like 192.168.0.xxx). They try using that address e.g. 192.168.0.xxx:4664 to connect.
If you have an Android phone, you can also download the AIY app and use it to connect to your WiFi (follow the instructions in the app) and it will tell you the IP address. There is no such app for the iPhone. If you cannot find you IP address, there are other methods to scan for it - contact me 🙂
If all else fails, you can connect a monitor and keyboard to the Raspberry Pi. You will see a login (username Pi, password like before - ask me if you do not know). A desktop will come up and you can go to settings and connect to the WiFi. Note you will need a HDMI adapter and a USB adapter - both were included in the Pi Environment box for those who participated before. More details on how to connect can be found here.
https://play.orcsgirls.org/Pi/wifi.php was updated to include a few more options in the file that might help with certain networks. If you are having issues, try generating wpa_supplicant.conf again and copy if to the SD card.
Camera / Raspberry Pi does not turn on
So you built the camera, insert the microSD card and powered it up, but there is no green light blinking on the Raspberry Pi (see photo where to look). Here are some trouble shooting tips. Note if the camera gets too hot to touch or you notice a 'burned smell', unplug it immediately - you have some wiring issue. Here are things you can try, easiest first 🙂
Make sure you have power. Try another outlet or plug something else (like a lamp) into the one you are using and make sure there is power. Next find another device you can power by USB (e.g. if you have another Raspberry Pi or a MicroBit or anything else that uses this type of USB power plug) and see if that powers up. If not, the power supply or cable might be broken. If another device works, we know we get power to the camera ✅
Another common reason for the Raspberry Pi not to start is a missing or corrupted microSD card. Here is what to check:
First check it is inserted correctly and all the way in (see photo).
If it is in correct you might have a corrupted card and need to reflash it using the adapter and a computer. You need this program https://www.balena.io/etcher/ and the image which you can download here https://drive.google.com/file/d/1-vd9j-8Fha0oVt22rgenetDq3p0gkuZW/view?usp=drivesdk. Make sure to copy wpa_supplicant.conf back on the card after flashing is done.