/* jquery */ /* jquery accordion style*/ /* jquery init */
Showing posts with label AI and Robots. Show all posts
Showing posts with label AI and Robots. Show all posts

Raspberry Pi AI HAT+ 2

Following on from its successful initial HAT-style AI add-on board for the Raspberry Pi 5 the foundation has release a second generation product, namely the $130 Raspberry Pi AI HAT+ 2.

This new, more powerful board can run a range of Generative AI models directly on the device, ensuring data privacy and security, while eliminating the need for subscriptions to expensive cloud-based AI services.

A new Hailo-10H neural network accelerator delivers 40 TOPS of inferencing performance with low latency. And with 8GB of dedicated on-board RAM it can handle more sophisticated language (LLM) and vision (VLM) tasks.

Other benefits include tight integration with the Pi Camera software stack (libcamera, rpicam-apps and Picamera2). In fact, you can train a model with custom image datasets and the Hailo Dataflow Compiler.

The initial models availability list - DeepSeek-R1-Distill, Llama3.2, Qwen2.5-Coder, Qwen2.5-Instruct and Qwen2 - will be supplimented by others during 2026.

Visit Hailo’s GitHub for examples, demos, frameworks and and GenAI-based applications, such as VLMs, voice assistants, and speech recognition.

Try My Free Python Coding Tutorials

AI in Magazines

Here are some useful AI coding/maker articles.

MagPi magazine

Issue 152 of the official MagPi magazine has a number front page AI feature.
The articles include how to Train before Inference and how to use Tensors in Python. Plus there is a hands-on tutorial showing how to build AI Hat+ and Raspbery Pi AI Camera projects.

Issue 147 of the official MagPi magazine has a number of AI articles.
One article covers the release of the new Raspbery Pi AI Camera, explaining the hardware elements, interface connector and the benefits of its built-in processor.
Another article shows what can be done with the Raspberry Pi AI Kit.
Plus there's a diverse selection of AI projects, including people detectors, ANPR trackers, pose detectors, text generators, music generators and an intelligent pill dispenser.

Linux magazine

In September 2023 the Linux Magazine published an article entitled Artificial intelligence on the Raspberry Pi. This article covers how to use a camera-equiped Raspberry PI to detect objects using pre-trained models loaded via the TensorFlow Lite framework and the OpenCV library.

The December 2024 issue article Ghost Coder compares some of the best AI assisted coding technologies, including GitHub Copilot, CodeConvert, Refraction, Codeium, Figstack, Tabnine, JetBrains AI, Tabby and FauxPilot.

Discover the Raspberry Pi

Raspberry Pi Code Club - AI Projects

There is a new collection of entry-level Al coding tutorials on the Raspberry Pi Code Club website.

Each tutorial is designed to offer a gentle introduction to the fascinating world of machine learning via an easy-to-follow step-by-step process.

And these tutorials are applicable to most web-connected computing devices or platforms, including all Raspberry Pi boards.

Try My Free Python Coding Tutorials

Raspberry Pi AI Camera Projects

In a previous post Raspberry Pi AI Camera post I highlighted its ability to run on all Raspberry Pi boards due to its built-in processing chip and memory. All you need to do is simply connect the AI Camera via the CSI interface.

Now let's take a look at the kind of applications and projects this camera can do.

Models

Firstly, there are two built-in AI models, namely MobileNet SSD and PoseNet.
MobileNet SSD is applicable for real-time object detection applications, while PoseNet is trained for pose identification.

To start just run the rpicam-hello with your choice of model. The model will be transferred to the camera module over the CSI connection (a process handled by the on-board RP2040) and loaded into 8MB of on-device RAM. The model stays loaded and constantly proceses images in real-time.

However, there is more. For example Raspberrry Pi have their Github libcamera repository, with three Python code examples for image classification, object detection and segmentation.

These code examples work with a range of models including EfficientNET v2, MobileViT XS, ResNet18, SqueezeNet and YOLOv8n. YOLOv8 can run at the maximum 640×640 resolution with others are limited to lower resolutions.

Take a look at the full libcamera documentation to discover how to get started.

Projects

As for project ideas they are almost limitless.

Here are a few examples:
• Smart Doorbells
• Smart Room/Baby Monitors
• Gesture Controled Devices
• Smarter Robots
• Pet or Wildlife Observation

But, of course, the fun is in coming up with your own ideas - either by taking a different approach to an existing idea, or coming up with a brand new one.

Discover the Raspberry Pi

Raspberry Pi AI Camera

To take advantage of the AI wave in June 2024 the Raspberry Pi organisation launched its Raspberry Pi AI Kit, a powerful piece of hardware capable of performing 13 trillion operations per second. However, this Kit needs the powerful Raspberry Pi 5 board plus a seperate camera module.

Now the Raspberry Pi organisation has launched a $70 Raspberry Pi AI Camera which is compatibile with older Raspberry Pi boards - including the Pi Zero - via a simple camera ribbon cable.

The AI Camera is built around a Sony IMX500 image sensor with an integrated AI accelerator. This chip runs a wide variety of popular neural network models, with low power consumption and low latency, leaving the Raspberry Pi processor free to perform other tasks.

Sony's suite of AI tools use existing neural network models including TensorFlow and PyTorch frameworks to to run efficiently on the AI Camera. And new models are able to take advantage of the AI accelerator power.

AI Camera highlights include:
• 12 MP Sony IMX500 Intelligent Vision Sensor (7.857mm)
• powerful built-in neural network accelerator
• 2028×1520 at 30fps or 4056×3040 at 10fps
• 1.55 μm × 1.55 μm pixel size
• 78-degree field of view
• integrated RP2040 Al accelerator using the I2C protocol
• 25mm × 24mm × 11.9mm dimensions

To find out more read the official Getting Started instructions.

Discover the Raspberry Pi

Python and Artificial Intelligence

Python is one of the best programming languages for AI development.

Here are some of the reasons why:

• Python has a clear and straightforward syntax. This ensures the code is both easy to write and easy to read. Consequently beginners, researchers, data scientists and engineers can quickly create AI programs.

• The Python language runs on just about any platform including MacOS, Windows, Linux and the complete Raspberry Pi range.

• There are a huge number of Python libraries and resources tailored specifically for AI and machine learning, making it ideal for both prototyping and full-scale development. These libraries include the mathematical NumPy and SciPy, Pandas for data manipulation and analysis, scikit-learn for traditional machine learning, TensorFlow (originally from Google) and PyTorch (originally from Meta AI) for deep learning, Keras for high-level neural networks, plus a vast collection tools and frameworks.

• Widespread adoption of Python for AI and machine learning in startups, tech industry companies and academia drives an ever growing stream of research papers, blue sky projects, state-of-the-art techniques, tools, open-source code and models.

Try My Free Python Coding Tutorials

Raspberry Pi LEGO® Build Hat

Combine a LEGO® kit with the power and flexibility of a Raspberry Pi computer and you’ll open up endless possibilities for design, engineering and construction. However, there are a few challenges involved in interfacing LEGO® components to the Raspberry Pi board's ports.

But now this challenge has been greatly simplified by the release of the Official Raspberry Pi Build Hat and three other associated products.

The Build Hat

The new Official Raspberry Pi Build Hat is a $25 add-on board for your Raspberry Pi. It connects to the 40-pin GPIO header and can be used to control up to four LEGO® Technic™ motors and sensors from the LEGO® Education SPIKE™ Portfolio.

This new HAT works with all 40-pin GPIO Raspberry Pi boards, including Raspberry Pi 4 and Raspberry Pi Zero. Use a ribbon cable, or other extension device, and you can also connect it to a Raspberry Pi 400.

The Build Hat Python Library

To help budding LEGO® engineers bring their inventions to life the Raspberry Pi Foundation has released a Python Library for the Build Hat.

This library supports all the LEGO® Technic devices included in the SPIKE™ Portfolio, those associated with the LEGO® MINDSTORMS® Robot Inventor kit plus other devices that use an LPF2 connector.

The New Power Supply

LEGO® Technic motors are really powerful, which means to drive them you’ll need an external 7.5V power supply.

Fortunately, there's a brand-new $15 power supply for the Build HAT that’s both reliable and rugged to help make the most of those motors.

The LEGO® Maker Plate

The LEGO® Education SPIKE™ Prime Expansion Kit includes an exclusive LEGO element the Maker Plate - the first one designed to connect to something that isn’t another piece of LEGO®. The Maker Plate makes it super easy to add a Raspberry Pi to your LEGO construction.

LEGO® SPIKE™ Prime components are perfect for rapidly prototyping projects. There is a distance sensor, a colour sensor, and an incredibly versatile force sensor. While the angular motors come in a range of sizes and include integrated encoders you can query in order to find their position to precisely control movement, or as input devices in their own right.

If you don’t have a Maker Plate take a look at this list of Build Hat compatible LEGO® elements to help identify what works best for your project.

Discover the Raspberry Pi

LEGO® and micro:bit with Brown Dog Projects

I recently came across the Brown Dog Projects website and its selection of simple-to-build, easy-to-code LEGO® themed projects using low-price microprocessor boards like the popular micro:bit.

You can also buy a number of kits, including a micro:bit board kit.
This kit has a Crazy Circuits Bit Board to simplify LEGO® brick and micro:bit board connectivity, plus many other items including a USB Cable, Battery Holder, Small Pushbuttons, LEDs, Potentiometer, Piezo Speaker, LEGO® Compatible Servo and a few LEGO® pieces.

The video below captures some of the potential of this kit.

The Brown Dog Projects website also has a collection of step-by-step project guides

Read More LEGO® Posts

Anton's LEGO® Construction Projects

The web contains many sources of information on LEGO® programmable hub/brick technologies and the associated construction kits. One of these is from a guy called Anton.

Anton has a blog containing How-To tutorials which explain the steps required construct and program LEGO® robot projects, like the ones show in his videos.

For example, Anton has a Bluetooth wireless remote control of the EV3 hub/brick post which involves LEGO® SPIKE Prime, the MicroPython language and the PyBricks module.

Anton also has a large collection of inspirational LEGO® project videos going back over 10 years and covering various products including LEGO® NXT, LEGO® Technic, LEGO® Mindstorms and LEGO® SPIKE.

LEGO® and Python and PyBricks

Over the 20 years LEGO® have created a number of intelligent programmable hub/brick technologies for LEGO® MINDSTORMS, LEGO® TECHNIC, LEGO® CITY, LEGO® BOOST and most recently LEGO® SPIKE.

However, the ability to use the Python programming language for coding LEGO® hub/bricks is a more recent innovation. One of the Python coding options is a module called PyBricks.

PyBricks has a number of advantages:
• It is Open Source with source code on GitHub
• It is based on the popular MicroPython language
• You can run your code directly on the hub/brick
• There's an app to write MicroPython scripts
• You can send scipts to the hub/brick via Bluetooth
• It offers precise motor control
• It is compatible with all official sensors and motors

PyBricks version 2.0 was a little limited in hub/brick support. But now, with PyBricks 3.0 Beta, there's support many more LEGO® platforms, including LEGO® BOOST, LEGO® TECHNIC Control+ and LEGO® City Trains.

Mars Rover for Micro:bit or Raspberry Pi Zero

JavaFX on Raspberry Pi

With all the excitement of the NASA Mars 2020 Mission launch on 30th July, maybe you fancy building your own Mars Rover vehicle.

Then take a look at the 4tronix MARS Rover Robot Kit.

The self-assembly kit is loosely based on the NASA/JPL Curiosity and Mars 2020 rover designand uses a similar rocker arm, bogey and differential arm mechanism.

It can be controlled with either a Micro:bit or Raspberry Pi Zero and comes complete with coding support for both these boards.

MARS Rover Robot Kit features include:
• 6 Motors - 80 rpm 6V, N20 micro gear motors
• 4 Servos - MG90S metal gear analog micro servos
• 4 Fire LEDS
• Ultrasonic distance sensor on steerable mast
• 30 special PCBs
• 11 different PCB designs

More LEGO® Boost Python Coding

As my original LEGO® Boost kit and Python coding post has received quite a number of page views I thought I'd post some additional information on this topic.

Andrey Pokhilko

I recently came across Andrey Pokhilko and his YouTube video (below). In this video he talks about his own LEGO® Boost Robotics construction and coding project, along with a demonstration of Vernie's capabilities plus a custom power pack hack.

To view Andrey's Python code examples navigate over to his GitHub resources page.

Mikhail Zakharov

I also noticed Mikhail Zakharov has added Python coded Voice Command Control to his own LEGO® Boost Vernie project.

Mikhail's Python source code can be found on his GitLib resources page.

Try My Free Python Coding Tutorials

LEGO® Boost and Python Coding

The LEGO® Boost kit is all about delivering a simplified route into robotics.

You can create models using standard LEGO® bricks. And there's an easy-to-get-started block-based coding app for iOS and Android.

The kit's Move Hub accepts a real-time stream of code instructions, sent via bluetooth, to interact with the built-in motors, LEDs and sensors.

However, it's also possible to interact with the Move Hub using Python, a far more flexible alternative block-based coding.

First you'll need a Python installation on your PC, Mac or Raspberry Pi 3B/3B+/3A+ or Zero W.

You'll also have to install some dependencies:

sudo apt-get install python3-pip
sudo pip3 install pexpect
sudo pip3 install pygatt

Then install the LEGO® Boost Python library module:

wget https://github.com/undera/pylgbst/archive/master.zip
unzip master.zip
cd pylgbst-master
sudo python3 setup.py install

To find out more on using Python with LEGO® Boost (and get to access to plenty of code samples) check out the series of articles by Mike Cook in the official Raspberry Pi magazine, starting at issue 80.

And read my More LEGO® Boost Python Coding post for additional inspiration.

My Free Raspberry Pi Python Coding Tutorials

Pi Wars 2019

The recent Pi Wars 2019 was spaced-themed affair in honour of the 50th anniversary of the Apollo Moon landing.

New challenges included rough terrain (crafted from plaster, wood, and bandages (crafted from plaster, wood, and bandages), fetch-and-carry Spirit Of Curiosity task, the Canyons of Mars autonomous maze navigation, the Hubble Telescope vision course and the Apollo 13 Obstacle Course (with a tricky PiBorg travellator section).

Competitor entries included a Mars Rover look-alike and a robot that looked like Starbug from Red Dwarf. And PiBorg demonstrated off their upcoming three-wheeled RockyBorg robot.

Maybe these Space-themed challenges and robots will inspire you own inventions, either at home or at your next CoderDojo or Code Club meeting?

Incidentally, there a collection of Space-themed projects in the latest edition of the Hack Space magazine.

Try My Free Python Coding Tutorials

micro:bit MOVE Mini robot

At last month's local CoderDojo I noticed a couple of MOVE mini buggy kits for the micro:bit, a low-cost introduction to robotics from Kitronik.

The basic MOVE mini kit requires mechanical assembly only, no soldering required. While add-on kits - such as Bulldozer, Tipper Truck and Bumper - enhance the robotic building possibilities.

This two-wheeled robot is powered by two servo motors. In addition there are five individually addressable coloured LEDs (NeoPixel compatible), which can be used as indicators, reversing lights and so on. You can also add a pen for LOGO-style graphical shape and plot drawing.

It can be controlled in a number of ways: via the micro:bit board; or remotely via a free Android app; or using a second micro:bit and its radio communication functionality.

Write your code using the Servo blocks in the Microsoft MakeCode Block editor. Alternatively, try the Kitronik-created Servo:Lite custom blocks, which simplify the coding process even further. To get started read the guides and tutorials on the associated Kitronic website.

Try my free micro:bit MicroPython coding tutorials