Control your Arduino and Pi projects with a PSP

Maxim Popov, 123RF

PSP Ahoy

, ,

We create a micro web server on an Arduino and a Raspberry Pi, and then use a PSP web browser to control an airboat.

We thought it would be fun to try and use an old PlayStation Portable (PSP) [1] on some Arduino and Pi Projects. We like using PSP's because they have a very long standby time (weeks), and if you drop a PSP it isn't as heart breaking as dropping your new smart phone. If you don't have a PSP you can usually find a used one for a reasonable price on eBay.

Some smart people were able to modify or "mod" the PSP firmware so that it is possible to run open source applications. We tried using Python, Lua, sdlBasic, and SSH on the PSP to talk to our Pi, but unfortunately none of these methods were 100% straightforward or reliable. In the end we found that using the built-in PSP Web browser worked best and didn't require a 'modding' or any special programming.

PSP Setup and Limitations

We were using an older PSP-1000 model so if you have a newer PSP Go or a PSP Vita you may not experience the same limitations we did. However, we think if you stick to our 'worst case' setup you should be safe.

From our testing we would recommend:

  • simple web pages only
  • no browser cache
  • simple wireless network

For the PSP-1000 the web pages had to be very simple, no CSS (Cascading Style Sheets) and no advanced HTML tagging. We had hoped to show Pi Node-RED web pages on the PSP but this was not possible.

We also found that it was important to turn off the PSP browser cache, otherwise a command would only work once. To do this, go into the PSP browser and select Tools, then Settings, (Figure 1) and in the Settings menu select Cache Settings.

Figure 1: Disable the PSP's cache to make sure things work as expected.

Our older PSP-1000 had some problems with the newer WPA2 wireless encryption, so to simplify things we created a small standalone open network. For Arduino projects this isn't an issue because the Arduino can be made into a standalone open Access Point. However on Pi projects where you are using an existing wireless network you might need to do some tweaking to add a limited access guest account.

To add a new connection on the PSP go the Network Settings and select Infrastructure Mode. Next select New Connection and Scan. The scan will only show networks that the PSP is able to connect to. WPA2 networks with AES encryption will appear in blurry text (Figure 2).

Figure 2: The PSP network scan. Encrypted networks appear blurred out.

As the PSP doesn't have a keyboard or touch screen, entering a web address can be quite time consuming. Bookmarks can be used to save your Arduino and Pi web addresses (Figure 3).

Figure 3: Add a PSP bookmark so you don't have to "type" in the address each time.

A simple web page

We created a custom HTML page with buttons to perform different actions. We used the HTML <form> tag to pass parameters between a web client and a web server. As part of the <form> tag an action and a method is also defined. For projects where you are driving vehicles for instance, actions could be: GO, STOP, LEFT, and RIGHT, for example. There are two types of methods, GET and POST. The POST method is more secure but we would recommend the GET method because it is simpler to implement on both the Arduino and Pi web Servers.

Listing 1 and Figure 4 show a simple GET form that could be used on both the Arduino and Pi projects.

Listing 1


01 <html>
02 <body>
03 <h1>Click a button to control the car</h1>
05 <form action='GO' method='GET' >
06      <INPUT TYPE='submit' VALUE="GO" >
07 </form>
09 <form action='STOP' method='GET' >
10      <INPUT TYPE="submit"  VALUE="STOP" >
11 </form>
13 <form action='LEFT' method='GET' >
14      <INPUT TYPE='submit' VALUE="LEFT" >
15 </form>
17 <form action='RIGHT' method='GET' >
18      <INPUT TYPE="submit"  VALUE="RIGHT" >
19 </form>
20 </body>
21 </html>
Figure 4: The web form on our PSP that can control a vehicle.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content