Tag Archives: app

Icon for Raspberry Pi

How to find a program’s directory in Raspbian OS

For Linux distros most programs are stored in the /usr directory. There is no “Programs Files” directory like for Windows. The executables are typically stored in /usr/bin with additional stuff in /usr/share and libraries in usr/lib etc.

There is also usr/local where stuff gets put when you do the compiling yourself. With /bin tending to be command line tools and /sbin being the directory for command utils only for root.

The quickest way to find the actual directory a program resides in is through terminal using the command “which”.

Here are some examples:

which nano

which gpicview

which chromium-browser

The programs referenced are the preinstalled text editor, image viewer and web browser. All of these examples will return the /usr/bin/ directory.

Note chromium is referred to as “chromium-browser” as typing “which chromium” will return no result as that is the incorrect name for the program. If you are unsure of a program name, run the program and then look for it in task manager to confirm.

How to convert pcm files to wav in Linux

Over the weekend I had to make a recording on my Android phone. I used the app Virtual Recorder  thinking I’d be able to just share the file afterwards but Virtual Recorder creates pcm files not typical mp3 files. I sent the file over to my Linux laptop, running Linux mint, to convert it.

Initially I had some trouble getting the conversion to work. Here are the steps I took.

Open a terminal window and navigate to the where the pcm file is. If you don’t know how to do this use the GUI file explorer to navigate to the directory where the pcm file is and then right click on white space and click on the option to open a terminal window. The terminal will open already set to run against the directory the pcm file is located in.

If you try to run any of the commands below and you don’t have ffmpeg installed you will be notified ffmpeg needs to be installed and it will give you the command to type in and run to install it.

If you want to convert a Virtual Recorder file specially you can use this terminal command below changing the file names to what you need.

ffmpeg -f s16le -ar 11250 -ac 2 -i YouInputFileName.pcm -ar 44100 -ac 2 YouOutputFileName.wav

Converting pcm files created by other applications may have varying results due to the sample rate of the source file. For example if you replace 11250 with 22500 as in the command below your output file pitch and speed will be increased. So you may need to play around with sample rates to get the output right.

ffmpeg -f s16le -ar 22500 -ac 2 -i YouInputFileName.pcm -ar 44100 -ac 2 YouOutputFileName.wav

How to connect your android device to a Playstation 3 or 4 controller wirelessly

A list of directly compatible games is at the bottom of this post.

Prerequisites:

Firstly you will need your device rooted. Rooting the device just means you have administrative privileges on the device, but unlike windows it’s not as simple as just changing a setting. Please see this tutorial on checking if an android device is rooted and this tutorial if you need instruction on rooting your device.

Connecting your PS3/4 controller to your android device:

As with all things android you might have guessed you need an app to connect your device to your Playstation controller. In this case you need the sixaxis controller. Unfortunately the app isn’t free but it is cheap!

However before you go handing over your dosh the guys at dancing pixel studios (strange choice of names considering they don’t seem to make any games) were nice enough to create the sixaxis compatibility checker so you can try before you buy.

Step 1.

Install the compatibility checker from the play store here.

Step 2.

Once installed, open the app and click Start. If you get a connection failed your device is not supported.

Sorry dude.

If not, Yay!

Continue!

Step 3.

Connect your controller to your device with a mini usb cable.

Step 4.

Click pair. This will write your android’s Bluetooth address to the controller. (Don’t worry about the pad not working on the playstation anymore, they’re a terrible console anyway. JK, to reconnect your controller to your playstation just connect the controller via the usb cable and it will write the playstation address back onto the controller.)

Step 5.

Once paired click start on the app. The device is now listening for controllers. If the controller is not turned on press the power button in the center. Now when you press buttons on the controller you should see them appearing on screen.

Congratulations, your device is compatible you now have the honour of buying the app here.

Some setup advice:

When you first use the app you’ll be asked to tick the box recognising Sixaxis Controller as a Keyboard & Input Method. Do so. It asks because this is a security feature as such devices could be potential recording key strokes etc.

In general settings I always have the box Auto Start ticked, this means the app launches whenever the device is turned. For the idle timeout option I set the timeout for 300, which means if the controller is not interacted with for five minutes the app turns the controller off saving the battery. On the subject of battery you can use your device to charge the controller which is nice.

Not all games are compatible even more so if you’re using an Android box or stick:

Native compatible of a game means that it was programmed to accept inputs from controllers some great examples being BombSquad, Asphalt 8, Dead Trigger however, sadly, a lot of games do not support native compatibility.

This could be for a number of reasons, like the developer just never bothered to code compatibility into the app or the app might compete with a console version of the game and the developer doesn’t want to cannibalize the market. Man I wished Fifa had controller support. . .

However the sixaxis controller app comes with a great feature to map button presses. This is especially useful to the PUBG mobile fans out there.

How to do this though is another post in itself so I suggest you google around, there’s plenty of great tutorials out there and the gentle souls of the internet have even created touch profiles for games available to download saving you the trouble of doing the mapping yourself.

Sadly though mapping on many Android boxes and sticks don’t seem to work to well if at all. This is down to these devices often shipping without the necessary touch drivers because they don’t have screens. Which makes sense, why ship a device with touch drivers that doesn’t have a screen? For PUBG mobile players who want to use a controller of course!

The following is a list of games that you can play using the android sixaxis controller app.

Remapping of keys maybe necessary, the correct mapping is as follows.

  • Cross: A
  • Circle: B
  • Square: X
  • Triangle: Y

Games:

I’ll be adding to this list over time so if I’ve missed a game you’ve tested and know to work please comment below.

  1. Dead Trigger (free)
  2. Dead Trigger 2 (free)
  3. Evac
  4. Asphalt 8 (free)
  5. Dead Effect (free)
  6. Beach Buggy Blitz (free)
  7. Beach Buggy Racing (free)
  8. Dream League Soccer (free)
  9. BombSquad (free)
  10. Horizon Chase (free)
  11. PewPew (free)
  12. PewPew 2
  13. Skyriders (free)
  14. ShadowGun
  15. SoulCraft (free)
  16. Real Boxing (free)
  17. Skate Party 2 (free)
  18. GT Racing 2
  19. Manuganu 2 (free)
  20. Shooty Skies (free)
  21. Reckless Racing
  22. Rail Racing
  23. Jet Car Stunts 2
  24. Aces of the Luftwaffe (free)
  25. Tank Riders (free)
  26. Raging Thunder 2 (free)
  27. Annelids (free)
  28. Warlings: Armageddon (free)
  29. Table Top Racing (free)
  30. Sine Mora
  31. Pako – Car Chase Simulator (free)
  32. Sword Of Xolan (free)
  33. Nub’s Adventure (free)
  34. Super Dangerous Dungeons (free)
  35. Only One (free)
  36. Turbo Dismount (free)
  37. Particle Arcade Shooter
  38. Luminescence (free)
  39. Leo’s Fortune
  40. Does Not Commute
  41. Pac-Man (free)
  42. Redline Rush (free)
  43. Radiant (free)
  44. Zenonia
  45. Voxel Rush (free)
  46. Winter Fugitives *
  47. Hopeless *
  48. Tiny Thief *
  49. Smash Hit * (free)

Any other suggestions please feel free to add a comment below.