# Xojo and Raspberry Pi

## What is the Raspberry Pi?

<span class="title-ref">Raspberry Pi</span> is essentially a tiny, inexpensive computer (about US\$35). Because it is tiny, it can be used in all kinds 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 <span class="title-ref">Raspberry Pi</span> 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 <span class="title-ref">Raspberry Pi</span> a favorite amongst tinkerers, Makers, electronics hobbyists and anyone else with a cool idea for a project. The <span class="title-ref">Raspberry Pi</span> and other similar computers are also referred to as "single-board" computers.

What makes the <span class="title-ref">Raspberry Pi</span> somewhat unique is that it uses an ARM processor (similar to what you see on cell phones and tablets and Mac computers), rather than an Intel or AMD CPU that is in traditional PCs.

Still, a <span class="title-ref">Raspberry Pi</span> 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 <span class="title-ref">Raspberry Pi</span> for free. Log into your account at xojo.com and go to the [Xojo Pi Store](https://www.xojo.com/store/#pi) page to get yours.

<div id="/getting_started/creating_more_apps/raspberry_pi/introduction_to_xojo_pi/the_xojo_ide_and_raspberry_pi">

The Xojo IDE and Raspberry Pi -------------------------

</div>

Xojo itself does not run on the <span class="title-ref">Raspberry Pi</span>, but you can run Xojo on a Windows, Mac or Linux computer and use it to make apps for the <span class="title-ref">Raspberry Pi</span>. Specifically Xojo can build console, desktop and web apps for the <span class="title-ref">Raspberry Pi</span> 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 <span class="title-ref">Raspberry Pi</span>.

<div class="youtube">

U2SOGkmEwqE

</div>

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](https://files.xojo.com//Documentation/ARMTest.zip) to run on a device to see if it will be compatible with Xojo apps.

<div class="warning">

<div class="title">

Warning

</div>

The original <span class="title-ref">Raspberry Pi</span> and the <span class="title-ref">Raspberry Pi</span> Zero are not compatible with Xojo apps because they both use the older ARMv6.

</div>

### Creating a Raspberry Pi app

Creating a <span class="title-ref">Raspberry Pi</span> 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 <span class="title-ref">Raspberry Pi</span>, click on Linux in Build Settings (because the <span class="title-ref">Raspberry Pi</span> 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 <span class="title-ref">Raspberry Pi</span>.

You can also use the Remote Debugger to write your code on Windows/Mac/Linux and run it for testing on the <span class="title-ref">Raspberry Pi</span>.

### Library requirements

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:

``` xojo
sudo apt-get install libunwind8
```

<div class="note">

<div class="title">

Note

</div>

To use an app you have built with Xojo with a Raspberry Pi equipped with a touchscreen, you must login with Xorg rather than Wayland.

</div>

## Useful Raspberry Pi links

- [RaspberryPi.org](https://www.raspberrypi.org/)
- [CanaKit](https://www.canakit.com/raspberry-pi)
- [AdaFruit](http://www.adafruit.com/category/105)
- [SparkFun](https://www.sparkfun.com/)
- [MagPi Magazine](https://www.raspberrypi.org/magpi/)
- [I Wish I Knew How to … Program Raspberry Pi 2 B and Raspberry Pi 3 B Electronics with Xojo](https://scispec.ca/index.php/books/28-program-raspberry-pi-2-b-with-xojo) book
- `Programming Raspberry Pi with Xojo</resources/programming_the_raspberry_pi_with_xojo>` textbook by Xojo

## 3rd party tutorials and projects

- Einhugur: [Guides for GPIO in Xojo](https://einhugur.com/GPIO/index.html)
- Lennard Electronics: [Writing to an I2C to parallel port chip](http://www.lennard.net.nz/rpi-pportread)
- Lennard Electronics: [Reading from an I2C to parallel port chip](http://www.lennard.net.nz/rpi-pport)

<div id="/getting_started/creating_more_apps/raspberry_pi/introduction_to_xojo_pi/see_also">

<div class="seealso">

`Raspberry Pi Tips</topics/raspberry_pi/tips>`

</div>

</div>
