If you encounter any problems with your Raspberry Pi, it's worth checking here to see whether we have already encountered this problem ourselves. If your problem has already been overcome, the problem and its solution will be described below. If you do not find a solution for your problem below, please get in touch. We'd like to know about it and try to solve it for you.
USB Sticks
I CANNOT SAVE TO MY USB STICK
PROBLEM:
When you try and copy files to your USB memory stick from your Raspberry Pi it doesn't work.
EXPLANATION:
This happens because the USB stick has been mounted in READ ONLY mode. This means that you can read the contents of the USB stick but not write to it.
Your USB stick has been formatted a special way that makes it readable by both Windows PCs and Raspbery Pis. To make this writable on your Raspberry Pi you will need to make sure that you have set you Raspberry Pi up appropriately so that it will mount the USB stick in read/write mode.
The Code Club laptops and Raspberry Pi SD cards are set up to work with these memory sticks. If you have set up your own Raspberry PI SD card at home, it is quite likely that you will be missing a key ingredient that is required to make this work. This is because it is not part of the standard out-of-the-box Raspberry Pi setup.
SOLUTION:
The solution to this problem is simple: install the ntfs-3g module.
- Make sure you are connected to the internet (you will be downloading something off the internet)
- Open the terminal window. This can be found in the menu system under Menu (Raspberry) >> Accessories >> Terminal.
- In the terminal window type the following command and hit enter: sudo apt-get install ntfs-3g
- Answer "YES" to any questions that you are asked.
You should now be able to copy files across to your USB memory stick. Try and copy a file just to make sure.
Video
I CANNOT GET MY PI TO DISPLAY ON MY MONITOR
PROBLEM:
When you power up your Pi and turn on your monitor, you either see nothing on your monitor or it displays a "no signal" message. In some cases, your might also see your monitor enter a "power save" mode.
EXPLANATION:
This behaviour simply means that your monitor is not receiving any video signal from the Raspberry Pi. More often than not, this is because the Pi is sending its video signal out of a different port (i.e. not the HDMI port that the monitor is plugged into).
SOLUTIONS:
1. Only plug in your Pi's power cable after you have connected your Pi to the monitor.
When your Pi is switched on for the first time, it will try to communicate with the monitor over the HDMI port. If it gets no response from the monitor over HDMI, it will simply presume that the monitor is connected to a different port (with the correct cable, the port sited to the right of the HDMI port can also support a video signal) and send its video signal out of that port instead. If you then plug your monitor in, it will try to say "Hello" to the Pi and get no response because the Pi is no longer listening on the HDMI port. This is the cause of the "no signal" message that you may see on your screen. Some monitors conserve energy when not in use by going into a "power save" mode. This is another clue that the monitor is not receiving any video signal to display.
Plugging your monitor into your Pi and switching the monitor on before powering up the Pi ensures that there is a monitor at the other end of the HDMI cable to respond when the Pi performs its monitor communication test.
2. Check that you have hdmi_force_hotplug=1 uncommented in your /boot/config.txt file and reboot your pi.
If step 1 doesn't fix this problem, there may be a problem preventing your Pi from communicating with the monitor at start up time. The reasons for this can be complicated but there is a simple way of avoiding this problem.
To get around this, we can tell the Pi (via its start up file) to just use the HDMI port regardless. This is done by editing the /boot/config.txt file and uncommenting the line containing the text hdmi_force_hotplug=1 in this file.
A # character at the start of any line of text in a file means that the line is commented out (the computer ignores these lines when reading the file). To uncomment the line, simply delete the # character and save the file.
BEFORE EDIT:
#hdmi_force_hotplug=1
AFTER EDIT:
hdmi_force_hotplug=1
Audio
I Cannot hear any sound through my earphones
Your sound can be coming out of either the HDMI (monitor/TV) port or your 3.5mm jack. This is the round hole to the right of the HDMI port. Your problem is likely to be simply that you are not listening out of the correct port. A simple fix is to send sound out of the 3.5mm jack and plug your earphones in there:
If you hear a clear musical tone, you have successfully routed sound out of the 3.5mm jack port.
However, the above solution will not play sound through your TV at home (for that, you will want the sound playing through the HDMI port). A solution for that will be written shortly.
- Open your terminal window (MENU > ACCESSORIES > TERMINAL).
- type the following command in the terminal window and hit ENTER: amixer cset numid=3 1 .
- Now plug your earphones into the round 3.5mm jack port - make sure they are pushed all the way in.
- On the terminal, type the following and hit ENTER: speaker-test -t sine -f 440 -c 2 -s 1 .
If you hear a clear musical tone, you have successfully routed sound out of the 3.5mm jack port.
However, the above solution will not play sound through your TV at home (for that, you will want the sound playing through the HDMI port). A solution for that will be written shortly.
Scratch
I DON't know where to find a 'RESOURCES' FILE
Some Scratch projects ask you to add sprites or backgrounds found in a Resources folder (for instance, the Resources/Rocket.png costume in project 3 - Fireworks). These are not part of the standard Scratch library but additional resources provided along with the project material. They can be found in a Resources folder alongside the relevant project instructions.
To import these resources into your project, click on the "choose new sprite from file" button in Scratch. From within the "New Sprite" window that opens, click the "Desktop" button on the left. You should then be able to browse down through the "Projects" folder to the relevant "Resources" folder that contains the project-specific resources that you need.
For instance, the abovementioned Rocket.png sprite file for project 3 can be found in:
Desktop > Projects > Scratch > Code Club UK > Scratch1.4 > Term 1 > Porojects 1-9 > LEVEL 1 > 03-Fireworks > Resources
To import these resources into your project, click on the "choose new sprite from file" button in Scratch. From within the "New Sprite" window that opens, click the "Desktop" button on the left. You should then be able to browse down through the "Projects" folder to the relevant "Resources" folder that contains the project-specific resources that you need.
For instance, the abovementioned Rocket.png sprite file for project 3 can be found in:
Desktop > Projects > Scratch > Code Club UK > Scratch1.4 > Term 1 > Porojects 1-9 > LEVEL 1 > 03-Fireworks > Resources
Python
I get errors when starting python
Problem:
When starting up Python, you get a complex looking error message. When you acknowledge this error Python quits. The error message is as follows:
IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
Explanation:
There are some old python code files (files called something like abcde.py) and compiled python file (files called something like abcde.pyc) in a folder that Python can see. For some reason, these files are confusing the Python IDLE application.
Solution:
The solution is simple - just delete the unnecessary .py and ,pyc files. Once you have done that, the errors will go away.
On the Code Club SD card image this year there are a couple of old python files called code.py and code.pyc in the /home/pi folder that are causing this problem. These are the files that you need to delete. To delete these files, do the following:
When starting up Python, you get a complex looking error message. When you acknowledge this error Python quits. The error message is as follows:
IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
Explanation:
There are some old python code files (files called something like abcde.py) and compiled python file (files called something like abcde.pyc) in a folder that Python can see. For some reason, these files are confusing the Python IDLE application.
Solution:
The solution is simple - just delete the unnecessary .py and ,pyc files. Once you have done that, the errors will go away.
On the Code Club SD card image this year there are a couple of old python files called code.py and code.pyc in the /home/pi folder that are causing this problem. These are the files that you need to delete. To delete these files, do the following:
- Open up the file manager (Menu > Accessories > File Manager).
- You will see a folder containing the code.py and code.pyc files. Right-click on these files and select "Move to Wastebasket".
- On the desktop, empty the wastebasket by right clicking on it and selecting "Empty Wastebasket".
- Start up Python (Menu > Programming > Python 3 (IDLE)) to confirm that it now starts up without incident.