How to Connect Lolo-Code to a Raspberry Pi: A Beginner’s Guide.

We’ll take you through the steps to help you get started!

Oscar Tidebäck
3 min readMay 17, 2023

To begin, let’s start by installing the latest version of Raspberry Pi OS 64-bit. Follow these steps:

  1. Start by installing Raspberry Pi OS 64-bit. You can find detailed instructions on how to do this in the provided documentation.

2. If you haven’t registered yet, simply visit beta.lolo.co and create an account.

Once you have your account, log in to Lolo and create an API key for your Raspberry Pi.

To do this, navigate to the Home section, then go to Configuration, followed by API Keys, and click on “+ Create”. Give the key a relevant name, ensure it has the necessary permissions, and make sure to save it securely for future use.

Screenshot of how to get Lolo-Code API-key

Now, you’re all set with the latest version of Raspberry Pi OS and your Lolo API key. These will enable you to explore and utilize the features offered.

To install Lolo-runtimed on your Raspberry Pi, simply open the terminal and enter these three commands:

These commands will add a new source to the package manager, update the package list, and install Lolo-runtimed and its dependencies. Once the installation is complete, you can start using Lolo-code runtimed on your Raspberry Pi.

echo "deb [trusted=yes] https://s3.eu-west-1.amazonaws.com/lolo-runtimed.debian/ stable main" | 
sudo tee /etc/apt/sources.list.d/lolo.list
sudo apt update
sudo apt install lolo-runtimed

We will also need Node.js. So run the following command to proceed with the installation:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | 
bash && . ~/.nvm/nvm.sh && nvm install 14 && nvm use 14 ; source ~/.bashrc

This command sequence will set up NVM, install Node.js version 14, and activate it for usage.

Then start the Lolo runtime by entering the following command, replacing ‘cFg0clZzxxxxxxxx…’ with the API key you created earlier:

lolo-runtimed --api-key cFg0clZzxxxxxxxx…

If you’ve already connected your Pi to Lolo, you can simply start the Lolo runtime by entering the following command:

lolo-runtimed

Once the runtime is started, it should look something like this:

pi@raspberrypi:~ $ lolo-runtimed
{"name":"runtimed","hostname":"raspberrypi","pid":2431,"module":"daemon","level":30,"msg":"starting v2.1.2","time":"2023-05-11T06:31:39.499Z","v":0}

Now make sure you’ve selected the connection to your Raspberry Pi from the Lolo Code dropdown menu. The connection should be indicated by a green dot, you might have to refresh the page.

Screenshot of how to select runtimed in Lolo-Code

If everything went well, it’s time to dive into some exciting projects! Below, you’ll discover at least one tutorial on how to construct something fun. This marks the beginning of a series of tutorials that will utilize Machine learning/AI and Raspberry Pi, along with Lolo. Get ready to embark on a journey of creativity and exploration!

If something went sideways, please reach out to us at Lolo. Either way, join us on our Discord community, where like-minded enthusiasts gather to share their experiences and knowledge. Let’s dive in together!

Tutorial:

  1. Lolo-Code and Raspberry Pi Take on a Fruity Adventure: Teach Your Pi to Recognize More Than Just Berries.
  2. Thumbs up if you're ready to take your Raspberry Pi projects to the next level.
  3. Talk the Talk and Let Pi Do the Walk: A Guide to Voice-Controlling Your Raspberry Pi with your Lolo-App! (Coming soon)

--

--

Oscar Tidebäck

I'm an IoT student and intern at Lolo.co. Passionate about technology and its potential to transform our world. Always learning and exploring new ideas.