With a single click, you can use your mobile phone to run any Python script on your Raspberry Pi. We show you how and explore all the other features RaspController has.

Transcript

Hey gang, Tim here at Core Electronics and just check this out. Today we're remotely controlling our Raspberry Pi with a phone through the Wi-Fi.

There are many ways to use your mobile phone to remotely control and manage a Raspberry Pi and one of the best options out there that I have found to date is Rasp Controller. You can find Rasp Controller in the Google Play Store but if you have an iOS device then the equivalent application to use is SimplePi. The article for this topic has screenshots for both systems so check there if you need.

Once linked with the Raspberry Pi, this application will allow you to control every single GPIO port, execute commands on the Raspberry terminal, create one-click terminal command shortcuts, view video from a connected camera, view data from different sensors, access all the files and folders and safely turn off and restart the Pi all from your phone and it even has full Pisense HAT compatibility. It provides the CPU speeds and temperatures so you can keep track of the operation of your Raspberry Pi board remotely.

Connection is easy once you've connected the Raspberry Pi and the phone to the same network and ensured the Raspberry Pi will work with SSH. This is by default disabled on the Raspberry Pi so we're going to need to turn it on. Launch the Raspberry Pi configuration from the preferences menu, navigate to the interfaces tab and select enable next to the SSH option. Once you click okay the settings will be saved.

While in desktop it is best practice to change the username and password of your setup to something unique. The easiest way to do so is from the Raspberry Pi desktop in the Raspberry Pi configuration section. Having done this you will now be able to use your phone.Open up the installed app, jump into the add device and type in the host IP address of your Raspberry Pi. You can display the IP address of your Raspberry Pi by typing hostname-i into the Raspberry Pi terminal or by checking your routers device list. Then once that section is complete press that little floppy disk icon to save the details and you will see your Raspberry Pi in the list of available devices that you can connect to.

So that is all the technical stuff done, let's show off what we can do with this. Starting off I'm going to show you what options you're presented with once you click on your connected Raspberry Pi which you can see is quite a number. All sections are intuitive with a single click taking you into the feature set and all of them work just how they should.

So let us dive into some examples starting with the GPIO pin control, a method perfect for connecting your Pi to the real world. GPIO pins are commonly utilized to control and communicate with other electronic components so if you want to control the world these general purpose input and output pins are the way to go. Whether it's turning off a switch or turning on an LED or controlling a relay that can turn all the lights on in your house or opening up your garage door or lighting up your Christmas display or any manner of device control with the Rasp Controller app you can remotely control every single one of these GPIO pins including the PWM pins and tell it to either send electricity through, pulse it or not send any at all.

Here on the table I have hooked up a simple LED light and resistor onto a breadboard with a red power wire coming from the GPIO pin number two of the Raspberry Pi and the black wire going to a ground pin on the Raspberry.Pi. Schematics of this exact circuit can be found in the article. Thus when I press the button on my phone to give power through this GPIO pin number two you're going to see that LED become illuminated.

Badda boom badda bing and there it is working and if I want to stop power to the LED with a single press I can stop it just the same way. I've also set it up so it can pulse just one time. There you go. This is the same method I was using to control the smart house servos and lights from the intro.

Adding new GPIO pins are very easy to do and you can do that by clicking on this wrench icon right here activating it and then telling it exactly what you would like it to do. This application also enables you to access the Raspberry Pi console and type whatever your heart desires into it and if what you're going to be typing into that terminal is long and arduous to do especially if you're doing it multiple times you can create commands.

For example the longhand version to run my door and garage opening code which is controlled by two servos involves typing out the following sudo command telling it to run in Python then followed by locating the file name which ends up being a very long string of text. Then if you want to run this code again you're going to have to type all of that out again.

However I can instead use this app to create a command for it. These commands are single click buttons that will write whatever string of text you decide straight into the shell and run it. Now all I need to do is jump onto my phone connect it to the Raspberry Pi and with one click I'm going to have my script running just as I want it to do.

A much improved process and creating a new command is easy just press that button in the bottom.Right, let's go through this as normal.

Next, I have to show you the camera feature in RaspController which will provide a live feed of the Raspberry Pi camera module directly from the Raspberry Pi. It is important to be able to do this to have it enabled in the Raspberry Pi configuration and have the camera attached properly with the ribbon cable to your Raspberry Pi. Then, with all that done and a quick reboot, it is literally that easy and now you can know exactly what your Raspberry Pi is looking at in any given moment.

There it is. So here, I've connected a Sense HAT on top of the Raspberry Pi to flex the LED control and sensor data display. There are other very commonly used sensors also readily available to be utilized in this app too. With PySense, you can display whatever colour you want in this section and even display a scrolling text message. You can set it up just like this and it works straight away. The sensor section over here displays all the data including your pitch and roll and comes out at you live.

Technical details like CPU, RAM, and disk monitoring can be viewed simply. A list of every single application running and how much brain power is taking up on your Raspberry Pi can also be seen. This means you can keep on top of your Raspberry Pi wherever it may be. This app also makes it super easy to access, modify, and pull information out of the Raspberry Pi utilizing the file manager options. Being able to transfer data to your phone seamlessly and quickly is just so good.

Finally, for this guide, are the shutdown and reboot buttons that work exactly the way they should. To get these to run, you're going to need to do a small pseudo install script on your Raspberry Pi terminal, but once completed, it's going to be happy.Days. So there it all is. Full control of the Raspberry Pi using a mobile phone with a great UI. If you are looking to access the Raspberry Pi from outside your local network you will need to set up a port forwarding rule on your home router.

Most routers have this feature available but when doing so make sure to change the default Raspberry Pi user and password to keep your security high. You definitely don't want someone opening your garage door from the other side of the world.

After discovering Rasp's controller I find myself using it all the time. It really has revolutionized the way I interact with Raspberry Pi microprocessors and I've also just discovered they have a version for controlling Arduinos too.

If you want any extra information pop me a message down below or on our Core Electronics forum and with that, until next time, stay cozy.

Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.