Joy-it SEN-MMA8452Q Handleiding


Lees hieronder de đź“– handleiding in het Nederlandse voor Joy-it SEN-MMA8452Q (6 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 23 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/6
www.joy it.net-
Pascalstr. 8 47506 Neukirchen Vluyn-
3 AXSIS DIGITAL ACCELERATION SENSOR MODULE-
SEN MMA5482Q-
1. GENERAL INFORMATION
Dear customer,
Thank you very much for choosing our product. In the following, we will
show you what you need to consider during commissioning and use.
Should you unexpectedly encounter problems during use, please do not
hesitate to contact us.
www.joy it.net-
Pascalstr. 8 47506 Neukirchen Vluyn-
3. COMMISSIONING WITH THE RASPBERRY PI
Wiring:
Installation:
To be able to use the ADC, you have to enable I2C.
Enter the following command:
Now navigate to the point > and enable the I2C interface.Interfacing Options -I2C
sudo raspi config-
Raspberry Pi MMA8452Q
GND (Pin 6) GND
3v3 (Pin 1) VCC
SDA (Pin 3) SDA
SCL (Pin 5) SCL
www.joy it.net-
Pascalstr. 8 47506 Neukirchen Vluyn-
Code example:
# Distributed with a free will license.-
# Use it any way you want, profit or free, provided it fits in the licenses of its
# associated works.
import smbus
import time
# Get I2C bus
bus = smbus.SMBus(1)
# MMA8452Q address, 0x1D(28)
# Select Control register, 0x2A(42)
# 0x00(00) StandBy mode
bus.write_byte_data( , , 0x1D 0x2A 0x00)
# MMA8452Q address, 0x1D(28)
# Select Control register, 0x2A(42)
# 0x01(01) Active mode
bus.write_byte_data( , , 0x1D 0x2A 0x01)
# MMA8452Q address, 0x1D(28)
# Select Configuration register, 0x0E(14)
# 0x00(00) Set range to +/- 2g
bus.write_byte_data( , , 0x1D 0x0E 0x00)
time.sleep(0.5)
# MMA8452Q address, 0x1D(28)
# Read data back from 0x00(0), 7 bytes
# Status register, X Axis MSB, X- - - - - -Axis LSB, Y Axis MSB, Y Axis LSB, Z Axis MSB, Z Axis LSB
data = bus.read_i2c_block_data(0x1D, , 0x00 7)
# Convert the data
xAccl = (data[ ] * 1 256 16 + data[2]) /
if xAccl > :2047
- xAccl = 4096
yAccl = (data[ ] * 3 256 16 + data[4]) /
if yAccl > :2047
- yAccl = 4096
zAccl = (data[ ] * 5 256 16 + data[6]) /
if zAccl > :2047
- zAccl = 4096
# Output data to screen
print "Acceleration in X-Axis : %d" %xAccl
print "Acceleration in Y-Axis : %d" %yAccl
print "Acceleration in Z-Axis : %d" %zAccl
Now create a file with the extension ".py" and copy the code example into it.
Then execute this file with the console command shown below:
You should now see the values of the three axes as a console output.
sudo python file- name.py


Product specificaties

Merk: Joy-it
Categorie: Niet gecategoriseerd
Model: SEN-MMA8452Q
Kleur van het product: Black, Gold, Silver
Breedte: 350 mm
Diepte: 20 mm
Hoogte: 7 mm
Compatibiliteit: Arduino/Raspberry Pi
Type product: Versnellingssensor

Heb je hulp nodig?

Als je hulp nodig hebt met Joy-it SEN-MMA8452Q stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Joy-it

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd