Getting Started with Raspberry Pi
From Xojo Documentation
What is the Raspberry Pi?
Raspberry Pi is essentially a tiny, inexpensive computer (about US$35). Because it is tiny, it can be used in all kind of things that a typical computer does not work well with, such as robotics and embedded systems. Since it is also inexpensive, it functions as a great learning tool, making it possible for anyone to have their own computer. Additionally, because a Raspberry Pi is a fully functional computer, with input/output, storage and wifi capabilities, it can also be used to interface and control other things. This makes the Raspberry Pi a favorite amongst tinkerers, Makers, electronics hobbyists and anyone else with a cool idea for a project. The Raspberry Pi and other similar computers are also referred to as "single-board" computers.
What makes the Raspberry Pi somewhat unique is that it uses an ARM processor (similar to what you see on cell phones and tablets), rather than an Intel CPU that is in most things typically categorized as "computers".
Still, a Raspberry Pi is a full computer. You can connect a keyboard, mouse and display to it. You can plug in storage and install an operating system on it (typically Linux). Now it is not a powerful computer, to be sure, but it is still powerful enough for many tasks.
Xojo Pi licenses let you build console and desktop apps for the Raspberry Pi for free. Log into your account at xojo.com and go to the Xojo Pi Store page to get yours.
Xojo and the Raspberry Pi
Xojo itself does not run on the Raspberry Pi, but you can run Xojo on a Windows, Mac or Linux computer and use it to make apps for the Raspberry Pi. Specifically Xojo can build console, desktop and web apps for the Raspberry Pi 2, 3 or later. You can use the Remote Debugger to write your code on Windows/Mac/Linux and run it for testing on the Raspberry Pi.
Xojo is also able to build apps for other similar "single-board" computers that use the ARMv7 or later CPU. Download the ARMTest console app to run on a device to see if it will be compatible with Xojo apps.
|The original Raspberry Pi and the Raspberry Pi Zero are not compatible with Xojo apps because they both use the older ARMv6.|
Creating a Raspberry Pi App
Creating Raspberry Pi app is no different than creating an app for other targets (Windows, Mac or Linux). Select the type of project you want from the Project Chooser and then when you are ready to build for Raspberry Pi, click on Linux in Build Settings (because the Raspberry Pi runs a version of Linux) and change the Architecture property in the Inspector to "ARM 32-bit". Build your app and then transfer the built folder to the Raspberry Pi.
You can also use the Remote Debugger to write your code on Windows/Mac/Linux and run it for testing on the Raspberry Pi.
Starting with 2018r1 you will need to install the libunwind8 library on your Pi in order to run Xojo apps. You can install the library from Terminal with this command:
sudo apt-get install libunwind8
Useful Raspberry Pi Links
- MagPi Magazine
- I Wish I Knew How to … Program Raspberry Pi 2 B and Raspberry Pi 3 B Electronics with Xojo book
- Programming the Raspberry Pi with Xojo textbook by Xojo
3rd Party Tutorials and Projects
- Einhugur: Guides for GPIO
- Lennard Electronics: Writing to an I2C to parallel port chip
- Lennard Electronics: Reading from an I2C to parallel port chip