Luca has written up a great tutorial on the differences between delay() and millis() on the Arduino, which i think is worthwhile to share. He also presents it in a very easy to understand format.
All posts by Mark Williams
Raspberry Pi 3 + LED Cube + Spectrum Analyzer = Awesome Audio Visualizer!
To create an awesome audio visualizer, using a spectrum analyzer( C.A.V.A: Console-based Audio Visualizer for ALSA ), all you need is a Raspberry Pi 3 and a RGB LED cube - VoxCube!
C.A.V.A
CAVA was created by Karl Stavestrand and it is a great tool to create an audio visualizer in the console.
Continue reading Raspberry Pi 3 + LED Cube + Spectrum Analyzer = Awesome Audio Visualizer!
How to Program an AVR/Arduino using the Raspberry Pi GPIO
In this tutorial I am going to show you how to program an AVR(ATmega328) and an Arduino UNO using the GPIO on the Raspberry Pi.
Adding an Arduino or an AVR to your projects will give you much greater flexibility.
Hook up the Raspberry Pi to the Arduino UNO or AVR.
The image below shows how to connect a Raspberry Pi 2 and an Arduino UNO. click the image to make it larger
Continue reading How to Program an AVR/Arduino using the Raspberry Pi GPIO
Raspberry Pi controlling a LED cube with Python
The above LED cube [VoxCube] is being controlled via a Raspberry Pi, using python and the official Raspberry Pi display.
Buttons were setup using the Kivy. Kivy is a Python library which makes creating buttons and events with a touchscreen very easy.
Here is a very good guide on how to get Kivy setup on a Raspberry Pi.
Continue reading Raspberry Pi controlling a LED cube with Python
New Kickstarter - VoxCube - 8x8x8 RGB LED Cube for the Raspberry Pi
We have been busy over the last 6 months creating something special!
We have always liked the idea of LED cubes, however there was no easy way to drive these LED cubes with a Raspberry Pi.... until now.
VoxCube is an 8x8x8 RGB LED Cube which has been specifically designed for the Raspberry Pi, however it is also compatible with other microcontrollers. E.g. Arduino
Cubes can also be chained together, the image below is four VoxCubes being controller via a Raspberry Pi.
Head over to the Kickstarter page for more details.
Super low cost VGA output for the Pi Zero • Hackaday.io
Here is a great post by mincepi which shows how to enable VGA output on a Pi Zero for less than $5
The vga666 by Gert is already a low cost VGA output option for the Pi. But we can do better with the Zero! We'll use 16 bit output instead of 18 bit: this frees up the SPI and I2C ports with little loss in quality. The resistors can be soldered between the Zero and the adapter, making the PCB smaller and eliminating a connector. I've determined that 5% resistors are good enough: no need for higher cost 1% units. By not using the middle row of pins in the HD15 connector, we can straddle-mount it on the PCB edge. Finally, the connector can be male, so the Zero will connect to the monitor ChromeCast style: no VGA cable needed. (This connector could even be scrounged from an old VGA monitor cable for free!) If you order the boards from OSHPark, it will cost $4.95 for three copies. Enough resistors and connectors to build three will cost $5.92 from Digi-Key. That works out to $10.87 to build three, or $3.62 each!
Source: Super low cost VGA output for the Pi Zero • Hackaday.io
Self Driving RC Car with a Raspberry Pi and Arduino
Here is a great project by Zheng Wang, which uses a Raspberry Pi and an Arduino to create a self driving car.
"Objective Modify a RC car to handle three tasks: self-driving on the track, stop sign and traffic light detection, and front collision avoidance."
Source: Self Driving RC Car – Zheng Wang
BerryIMU and Pi Zero
BerryIMU code for Arduino - Accelerometer, Gyroscope and Magnetometer
Our GIT repository has been updated with an Arduino sketch which calculates angles using a complementary filter. The heading is also calculated using the magnetometer.
Detailed Guides and Tutorials
In this order;
Guide to interfacing a Gyro and Accelerometer with a Raspberry Pi
Guide to interfacing a Gyro and Accelerometer with a Raspberry Pi - Kalman Filter
Create a Digital Compass with the Raspberry Pi – Part 1 – “The Basics”
Create a Digital Compass with the Raspberry Pi – Part 2 – “Tilt Compensation”
Create a Digital Compass with the Raspberry Pi – Part 3 – “Calibration”
These cover both BerryIMU and displaying graphics with SDL on a Raspberry Pi;
How to Create an Inclinometer using a Raspberry Pi and an IMU
BerryIMU Python Code now Includes Tilt Compensation
The python code for BerryIMU now includes tilt compensation for the compass heading.
Code
Git repository here
The code can be pulled down to your Raspberry Pi with;
Tilt Compensation
Without tilt compensation the heading (magnetometer reading) will be skewed when the IMU is tilted.
The below graph below shows a magnetometer (or compass)being held at 200 degrees and being tilted in various directions. The blue line is the raw heading, the orange line is the heading after applying tilt compensation. As you can see, without tilt compensation the heading will change if the compass is tilted.
More information about tilt compensation can be found in this post