This example uses the 'lilypad 'link mpu6050 module, 'arduino uno' as the USB download device, the specific connection method please move: http://www.cnblogs.com/hangxin1940/archive/2013/04/06/3002709.html
# How to connect lilypad to mpu6050! [Lilypad] (http://images.cnblogs.com/cnblogs_com/hangxin1940/467679/o_700px-6_dof_mpu6050.png "Lilypad ")
The pins corresponding to Lilypad and mpu6050:
* + *-> * VCC *
*-> * Gnd *
* A4 *-> * SDA *
* A5 *-> * SCL *
# Download the i2cdev Library
Https://git
The content of this article is Raspberry Pi python get GY-85 nine axis module information example, here using Python curses package development cli window program, used to refresh the sensor reading in real time, see the code first
GY-85.py:
The code is as follows:
#! /Usr/bin/python3#-*-Coding: UTF-8 -*-Import cursesFrom time import *From i2clibraries import i2c_itg3205, i2c_
I. List of components
Arduino Pro Mini
GY-30
Second, the wiring
Using IIC communication mode, GY-30VCC connect +5v,gnd grounding. GY-30 SDA, SCL respectively A4, A5
Third, the source code
#include
! [GY-85] (http://images.cnblogs.com/cnblogs_com/hangxin1940/466697/o_gy85.jpg "GY-85 ")
9-axis IMU sensor (GY-85 module) can also be seen as three modules 'itg3205 Three-Axis Gyroscope sensor ''' adxl345 three-axis accelerator tilt sensor ''' hmc5883l Electronic Compass'
The GY-85 Module Interface is I2C and can be e
, currently is mode 0, you can directly connect the BMP280.SPI Wiring –bmp280Schematic in the previous blog, from the figure can be learned that the BMP280 of the film is Csb,ncs is the nine-axis MPU9250 chip selection pin. Black to close to the scrap of the tip gave me a reasonable excuse, but also please ignore my rotten to the slag of the welding. The wiring of the SPI0 is as follows:
bbb gy-91
p9_1
gnd
Connection Method please move here http://www.cnblogs.com/hangxin1940/archive/2013/04/05/3000395.html
The CLI window program is developed using the python curses package to refresh sensor readings in real time.
Final Effect! [Gy85] (http://images.cnblogs.com/cnblogs_com/hangxin1940/466697/o_GY-85.jpg "gy85 ")
GY-85.py:
#! /Usr/bin/python3#-*-Coding: UTF-8 -*-Import cursesFrom time import *From i2clibraries import i2c_itg3205, i2c_adxl345, i2c_hmc5883
Look at the effect chart first
gy-85.py:
Copy Code code as follows:
#!/usr/bin/python3
#-*-Coding:utf-8-*-
Import Curses
From time Import *
From i2clibraries import i2c_itg3205, i2c_adxl345, i2c_hmc5883l
#==========================================================# GY-85 Sensor monitoring#==========================================================
de
binding Host:store_server, in the browser bar input store_server:8080, you can see the big congratulations!6. Server Virtual user name modificationYou may encounter permissions issues during the process, either because Nginx creates a subprocess or php5-fpm creates a child process, which is used by www-data user names and groups.To modify the default value, assign the value to a custom value. Please modify the user and group of/etc/nginx/nginx.conf and/etc/php5/fpm/pool.d/www.conf respectively.
Tags: Test port linux C TPS Tutorial define device average TomReference: Https://github.com/Razor-AHRS/razor-9dof-ahrs/wiki/Tutorial#sensor-calibrationThe hardware used in the link is SparkFun "9DOF Razor IMU", This article uses the GY-951, the same applies.Hardware Connection method:GY-951 module + Mini FT232RL (USB to serial port module)Setup software:Download and unzip the Razor AHRS firmware from the Https://github.com/Razor-AHRS/razor-9dof-ahrs/t
Here will I write stc12c5a60s2 single-chip microcomputer control Digital Light intensity module GY-30 (main chip BH1750FVI) program sharing, is to let seniors give treatise.
Update:
2014/04/29 14:05
(Supplemental: The following code only needs to modify the section of the. h file that contains the word "select" to achieve the effect of multiplexing)
For the serial debugging part, please refer to "SCM Program Assistance Debugging method (a) Serial deb
First up Effect chart:
"Processing" Here is the picture scrolling carousel, doing a little bit of processing: When on page 1th, you click on page 5th, the picture scrolling is a slide over, not from the 2-3-4-5 (this more than scrolling, see dizziness);
This is done by:
The rest is the source code sharing:
-------CSS----------------
Copy Code code as follows:
. gy-slide-scroll {
position:relative;
width:320px;
height:200px;
Ov
This article mainly introduces jQuery's methods and code sharing for implementing friendly carousel image effects. For more information, see:
[Processing] Here, the image is rotated and processed in a small way: When you click Page 1st in the 5th page status, the image scroll is a slide, instead of from 2-3-4-5 (this kind of multi-scroll, see Dizzy );
The implementation method is as follows:
The rest is source code sharing:
------- Css ----------------
The Code is as follows:
.
In fact, the method is almost the same, that is, using two filters, processing two components respectivelySobel operator first say Sobel operatorThe GX is the horizontal filter, the Gy is the vertical filter, the vertical filter is the horizontal filter rotates 90 degrees.The filter is a 3x3 matrix that will be used as a planar convolution of the image.If there is no edge then the two point color is very close, the filter returns a small value, otherw
In fact, the method is almost the same, that is, using two filters, processing two components respectivelySobel operatorFirst, the Sobel operator.The GX is the horizontal filter, the Gy is the vertical filter, the vertical filter is the horizontal filter rotates 90 degrees.The filter is a 3x3 matrix that will be used as a planar convolution of the image.If there is no edge then the two point color is very close, the filter returns a small value, other
The path to learning in Python -2018/6/27
1. Multiple table operations add a record to add a many-to-many relationshipMethod One: Incoming author object= Book.objects.get(bid=1= Author.objects.get(name="gy"= Author.objects.get(name="yq")book.authors.add(gy, yq)Operation Result:Mode two: Incoming author primary key= Book.objects.get(bid=2)book.authors.add(34)Operation Result:To remove a many-to-many rela
int gx,gy;
The temp varialbe int g1,g2,g3,g4;
Double weight;
Double DTEMP,DTEMP1,DTEMP2;
Set the edge of the image for the Impossible demarcation Point for (x=0;xIn the above code, there are several if-else to be aware of. In the canny operator's paper proposed by John Canny, the non-maximum suppression is performed in 0, 90, 45, 1354 gradient directions, and each pixel gradient direction is replaced by this four direction in terms of simi
Three or four yuan to Euler angle conversionAs a result of arctan and arcsin, this does not cover all orientations (the range of values for the corners has been met), so atan2 is needed instead of arctan.Iv. use in other coordinate systemsIn other coordinate systems, the above formula should be adjusted according to the definition of the axis. As in Direct3D, the x-axis of the Cartesian coordinate system changes to the z-axis, the y-axis to the x-axis, and the z-axis to the y-axis (regardless of
changes to the z-axis, the y-axis to the x-axis, and the z-axis to the y-axis (regardless of direction). 2.2.34-dollar calculation of the design of Euler's anglefloat q0 = 1, q1 = 0, q2 = 0, q3 = 0; Defining four elementsvoid Imu_update (void){float norm;Float GX = Mpu6500_gyro.x*gyro_gr,gy = MPU6500_GYRO.Y*GYRO_GR,GZ = unit conversion between mpu6500_gyro.z*gyro_gr;//anglesfloat ax = Acc_avg.x,ay = Acc_avg.y,az = acc_avg.z;float q0q0 = q0 * Q0;float
, the constraint can be met)The range for Ax, Ay, AZ is [0, 2*pi]. For example, when ay=0, the y-axis of the phone is vertical upward; when ay=pi, the y-axis of the phone is down; AY=PI/2, the phone level, screen up, AY=3*PI/2, the phone level, the screen downAccording to the law of 3D vector algebra, we know:
Gx=g*cos (Ax)
Gy=g*cos (Ay)
Gz=g*cos (Az)
G^2=gz^2+gy^2+gz^2
Therefore,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.