0

Gyroscopic 3D wireframe cube: Using a 3-axis gyro for live 3D perspective #MicroPython #3D

Martin Fitzpatrick on twobitarcade.net writes about a project combines the previous accelerometer-gyroscope code with the 3D rotating OLED cube to produce a 3D cube which responds to gyro input, making it possible to “peek around” the cube with simulated perspective, or make it spin with a flick of the wrist.

Software

The project is programmed in MicroPython. It uses two Python drivers for the project — one for the 128×64 OLED display, and one for the gyroscope.

The display in this example uses the ssd1306chip, so we can use the module available in the MicroPython repository.

The gyroscope is a MPU6050, a Python library for which is available from @adamjezek98 here on Github.

Hardware

Both the ssd1306 display and the MPU6050 gyroscope-accelerometer communicate via I2C. Helpfully they’re also on different channels, so we don’t need to do any funny stuff to talk to them both at the same time. They both connect to the main Wemos D1 Mini ESP-12 controller.

See the video below on a demonstration and check the post for the full tutorial.


Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 12,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython 2019!

Have an amazing project to share? The Electronics Show and Tell with Google Hangouts On-Air is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Trade war rolls on, effects will have lasting implications

Wearables — When you need support

Electronics — Stay disciplined with ERC

Biohacking — Focus Building Meditation with Michael Taft

Python for Microcontrollers — CircuitPython Day Celebrations! #Python #Adafruit #CircuitPython #PythonHardware @circuitpython @micropython @ThePSF @Adafruit

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.