This time I will show you how to make balancing Led dot using WS2812 led strip and MPU6050 accelerometer and gyroscope module.
This module is physically attached to the LED-strip, so when the LED-strip is held at a certain angle, the chip measures the angle of the LED strip and the Arduino uses this information to update the position of a virtual object as if it was a ball that is balanced on a beam and rolls from one side to the other if the beam is held at an angle. The position of the virtual object is indicated on the LED strip as a single LED that is illuminated. The code is taken from the Roel Arits blog with minor changes in hardware and software. Specifically I use Arduino Nano and LED strip with 37 LEDs.
To update the position of a virtual object that is falling to the earth under the influence of gravity, we use the formula :
y = y0 (V0 * t) (0.5 * a * t^2)
y = travelled distance in meters
y0 = start distance in meters
v0 = start velocity in meters/second
a = acceleration (gr
86 views
37
10
2 months ago 00:20:31 6
Параметры 3D принтера собранного своими руками финал
2 months ago 00:13:15 1
24 часа ВЫЖИВАНИЕ на Полигоне Практик Будущего | Влог
2 months ago 00:11:56 1
Пайка металла. Изготовление кулона. DIY
2 months ago 00:12:06 1
Травление металла в домашних условиях. Оригинальный кулон. DIY Часть 1
2 months ago 00:08:08 1
Делаю контроллер для аквариума. О процессе и немного о своем меню Arduino.
2 months ago 00:09:36 1
СДЕЛАЙ САМ в домашних условиях! ПРИКОЛЬНЫЕ ИДЕИ САМОДЕЛОК. ЧТО МОЖНО СДЕЛАТЬ СВОИМИ РУКАМИ?