Project #30 - UNIHIKER - Accelerometer and Gyroscope - Mk01

Project #30 - UNIHIKER - Accelerometer and Gyroscope - Mk01

 

https://www.donluc.com/?p=4069

 

https://youtu.be/i39MJH8QpuA

 

#DonLucElectronics #DonLuc #UNIHIKER #Display #IoT #Project #Debian #Python #Thonny #Programming #Electronics #Microcontrollers #Consultant

 

 

 

 

 

 

UNIHIKER Accelerometer and Gyroscope

 

The UNIHIKER's back panel is equipped with a 6-axis accelerometer-gyroscope sensor, capable of reading the X, Y, and Z values of acceleration individually, as well as the total strength in X, Y, and Z directions, and the X, Y, and Z values of the gyroscope.

 

DL2408Mk03

 

1 x UNIHIKER
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

 

DL2408Mk03p

 

DL2408Mk03p.py

CODE
"""
****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - Accelerometer and Gyroscope - Mk01
30-01
DL2408Mk03p.py
DL2408Mk03
1 x UNIHIKER
1 x USB Battery Pack
1 x USB 3.1 Cable A to C

-*- coding: utf-8 -*-
"""
# Import the unihiker library
from unihiker import GUI

# Import the time library
import time

# Import the Board module from the pinpong.board package 
from pinpong.board import Board

# Import all modules from the pinpong.extension.unihiker package
from pinpong.extension.unihiker import *

# Initialize the board by selecting the board type and port number;
# if not specified, the program will automatically detect it
Board().begin()

# Instantiate the GUI class and create a gui object
gui = GUI()

# Display the initial background image 'dlemk02'
img = gui.draw_image(x=0, y=0, w=240, h=320, image='dlemk02.png')

# Accelerometer
# Display the initial Accelerometer X valueAX
valueAX = gui.draw_text(x=60, y=145, text='0', font_size=10)

# Display the initial Accelerometer Y valueAY
valueAY = gui.draw_text(x=60, y=170, text='0', font_size=10)

# Display the initial Accelerometer Z valueAZ
valueAZ = gui.draw_text(x=60, y=195, text='0', font_size=10)

# Gyroscope
# Display the initial Gyroscope X valueGX
valueGX = gui.draw_text(x=60, y=240, text='0', font_size=10)

# Display the initial Gyroscope Y valueGY
valueGY = gui.draw_text(x=60, y=260, text='0', font_size=10)

# Display the initial Gyroscope Z valueGZ
valueGZ = gui.draw_text(x=60, y=285, text='0', font_size=10)

while True:
    
    # Accelerometer
    # Display the Accelerometer X
    AX = accelerometer.get_x()
    # Update the displayed Accelerometer X valueAX
    valueAX.config(text=AX)
    # Display the Accelerometer Y
    AY = accelerometer.get_y()
    # Update the displayed Accelerometer Y valueAY
    valueAY.config(text=AY)
    # Display the Accelerometer Z
    AZ = accelerometer.get_z()
    # Update the displayed Accelerometer Z valueAZ
    valueAZ.config(text=AZ)
    
    # Gyroscope
    # Display the Gyroscope X
    GX = gyroscope.get_x()
    # Update the displayed Gyroscope X valueAX
    valueGX.config(text=GX)
    # Display the Gyroscope Y
    GY = gyroscope.get_y()
    # Update the displayed Gyroscope Y valueAY
    valueGY.config(text=GY)
    # Display the Gyroscope Z
    GZ = gyroscope.get_z()
    # Update the displayed Gyroscope Z valueAZ
    valueGZ.config(text=GZ)

    # Delay for 1 second to keep the screen content displayed for a longer time
    time.sleep(1)

People can contact us: http://www.donluc.com/?page_id=1927

 

Teacher, Instructor, E-Mentor, R&D and Consulting

 

-Programming Language
-Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc...)
-IoT
-Wireless (Radio Frequency, Bluetooth, WiFi, Etc...)
-Robotics
-Automation
-Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
-Unmanned Vehicles Terrestrial and Marine
-Machine Learning
-Artificial Intelligence (AI)
-RTOS
-Sensors, eHealth Sensors, Biosensor, and Biometric
-Research & Development (R & D)
-Consulting
-Etc...

 

Follow Us

 

Luc Paquin – Curriculum Vitae - 2024
https://www.donluc.com/luc/

 

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
DFRobot Luc.Paquin: https://edu.dfrobot.com/dashboard/makelogs
Hackster.io: https://www.hackster.io/neosteam-labs
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

 

Don Luc

icon DL2408Mk03.zip 852KB Download(1)
License
All Rights
Reserved
licensBg
0