tag:blogger.com,1999:blog-6100511197805579796.post288291016647399117..comments2024-02-14T18:43:36.096+01:00Comments on Davide Gironi blog: AVR Atmega ADXL345 accelerometer library 02 + processingDavide Gironihttp://www.blogger.com/profile/16366076989473118278noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-6100511197805579796.post-69419141987797868882020-09-03T20:38:56.126+02:002020-09-03T20:38:56.126+02:00Hello, you've got mail.Hello, you've got mail.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-6536848647583492112020-09-03T14:28:08.696+02:002020-09-03T14:28:08.696+02:00hi , I could not download library if possible Emai...hi , I could not download library if possible Email it to me.<br /><br /> Thank<br />mojtabarosee1@gmail.comAnonymoushttps://www.blogger.com/profile/13848368547998203474noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-82959439480135670872019-06-28T13:59:52.253+02:002019-06-28T13:59:52.253+02:00Hello, yes you have to connect it using the i2c bu...Hello, yes you have to connect it using the i2c bus, don'f forget the two pull-up resistors on the SCL,SDA pins. No need to connect the CS PIN.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-5013182911849014262018-05-19T20:42:04.391+02:002018-05-19T20:42:04.391+02:00Hi,
I have the exact component you use in your vi...Hi,<br /><br />I have the exact component you use in your video and I want to program it for at ATMEGA324A-PU. In order to use it in the I2C mode, is it necessary only to connect the SCL, SDA, 5V and GND pins? I read here https://fluxworkshop.com/products/bdaa100040-adxl345-3-axis-acceleration-module-10-pin that "The method is selected by driving the CS pin to 0V for SPI or 3.3V for I2C.". Shouldn't the CS pin be connected or does the module does this? <br />Thanks!Roxanahttps://www.blogger.com/profile/12837091849952898088noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-18660894446147216532016-02-02T20:27:22.631+01:002016-02-02T20:27:22.631+01:00Hello, I'm sorry but I do not understand what ...Hello, I'm sorry but I do not understand what are you asking. The values from this X/Y/Z accel. are mapped to pitch and roll by the adxl345_getpitchroll function. Then pitch and roll are transmitted to the processing sketch.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-43357937600809708922016-02-02T16:38:13.133+01:002016-02-02T16:38:13.133+01:00Hi,
Please can you tell me whether we can map the...Hi, <br />Please can you tell me whether we can map the X Y Z values from ADXL345 on an X-Y graph on processing ? <br />Please help !!! Anonymoushttps://www.blogger.com/profile/08786986484849386622noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-40327879223964826162016-02-02T16:37:25.644+01:002016-02-02T16:37:25.644+01:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/08786986484849386622noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-26199512095807036572016-01-05T19:21:38.625+01:002016-01-05T19:21:38.625+01:00Hello. In this post you can find the code for ATme...Hello. In this post you can find the code for ATmega compiled with avrgcc. You can build an Arduino library from that code, or you can use the Adafruit ADXL345 Arduino library.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-90200866735428371152016-01-05T08:37:38.235+01:002016-01-05T08:37:38.235+01:00hello davide can you send me arduino code my mail ...hello davide can you send me arduino code my mail id is anvesh.mech993@gmail.com plzz<br />Anonymoushttps://www.blogger.com/profile/12857048742268743899noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-18367649452818118672015-04-22T20:53:11.252+02:002015-04-22T20:53:11.252+02:00Hello the accelcal_docalibrationclient function it...Hello the accelcal_docalibrationclient function it is used by my calibration helper script, you can find it here: http://davidegironi.blogspot.it/2013/01/accellerometer-calibration-helper-01.html<br />The adxl345_writeoffset it is used to write the offset to the offset adxl345 registers. I do not use this function because i compute the offset inside the microcontroller (see adxl345_getdata function: ADXL345_OFFSETX, ADXL345_OFFSETY, ADXL345_OFFSETZ).<br />You can get the offset by calibration the accelerometer. You can use the calibration helper, or even you can not use my helper and run the calibration by hand.<br /><br />Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-59527935351586840512015-04-22T13:36:11.534+02:002015-04-22T13:36:11.534+02:00Hi Davide, thanks for your work!
I have a questio...Hi Davide, thanks for your work!<br /><br />I have a question about the calibration of the sensor.<br /><br />In your main.c there is a adxl345_calibrateoffset(); but is commented out in the program code.<br /><br />Your adxl345.c has a adxl345_writeoffset in it, but the funktion is never used.<br />Where did i geht the offsetx, y, and x values to call the function?dionysoshttps://www.blogger.com/profile/01045642442533381610noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-42544593774465358612014-09-08T10:44:16.000+02:002014-09-08T10:44:16.000+02:00Hello, in this blog you can find code for the comp...Hello, in this blog you can find code for the compass, i've never tryid it but maybe the sht11 can be compatible whit the dht11, that code you can find here in that blog.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-677116262749868362014-09-07T18:36:20.829+02:002014-09-07T18:36:20.829+02:00Hello dear friend
I'm desperately need help
...Hello dear friend <br />I'm desperately need help <br />In the little time I have to connect my microcontroller with 6 sensors <br />The sensors are as follows <br /><br />hmc5843<br />mp3v5004dp<br />sht11<br />gt723<br />o2a2<br />tgs4161<br /><br />Do you have the code? <br />I am very very very grateful if you helpAnonymoushttps://www.blogger.com/profile/04648359209429969381noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-63006155761940960042014-06-02T13:37:28.910+02:002014-06-02T13:37:28.910+02:00Thank for your feedback, i've nevere use the a...Thank for your feedback, i've nevere use the adxl330, my comment below is about this adxl345.<br />Read using an event, instead of a loop, it's better cause the event it is catched when the uart has some char to read.<br />The raw values read from the accellerometer, are conveted firmware side.<br />Gravity is 1g, pressure on axis is (counts @ 1g - counts @ -1g) / sensitivity g, let's suppose for a 2g range a sensitivity of 8-bit (256 counts max, from -128 @ -2g, to 128 @ 2g), the value @ 1g should be 128/2, and -128/2 @ -1g, so (64 - -64) / 2 = 64. Given this value you can convert raw value to g force reading.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-71779281960392596452014-06-01T18:01:48.593+02:002014-06-01T18:01:48.593+02:00hy, thx for your code, programm !
could you help ...hy, thx for your code, programm !<br /><br />could you help me with your programm a bit <br /><br />i use an adxl330 which should be nearly the same, <br />it works fine and i rewrote the input not on seral change i just read it everytime in the draw loop <br /><br />-> whats the advantage of readin on serial event ?<br /><br />and how is your data range - from my datasheet the values inputed in my analog inputs x,y,z are between 2,7 and 3,3 so 0,6V are split up in 1023 steps<br /><br />i detect the stationary values and substract them so that i get a "ground" 0,0,0 <br /><br />so how does your program handle the input values - are they in an percentage range ? should i map my input values from 0 to 100 <br /><br />i scaled them down just for test purposes and made a quick test - it works so far <br /><br />but the axis jumps (mainly i guess because of my simple "grounding" initilasing)<br /><br />thx for answersVanceAncehttps://www.blogger.com/profile/17472544128713426239noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-84439399211025584312014-03-07T10:23:26.438+01:002014-03-07T10:23:26.438+01:00for the angular displacement, isn't better to ...for the angular displacement, isn't better to use a gyro?Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-58606915388086325772014-03-07T10:11:21.828+01:002014-03-07T10:11:21.828+01:00for an accellerometer, you have to adjust gain and...for an accellerometer, you have to adjust gain and offset. Take a look here: http://davidegironi.blogspot.it/2013/01/accellerometer-calibration-helper-01.html<br />Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-62230768236787707242014-03-07T06:19:03.650+01:002014-03-07T06:19:03.650+01:00my application is to find the angular displacement...my application is to find the angular displacement,, i am using the sensor to find the steering position of the vehicle. in that case how do i fix the sensor referenceAnonymoushttps://www.blogger.com/profile/03316180250760896480noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-16829278946843899802014-03-07T06:00:28.447+01:002014-03-07T06:00:28.447+01:00hi, can you throw some light on how to callibrate ...hi, can you throw some light on how to callibrate the sensor,, some step to step details would help me,, thanks in advanceAnonymoushttps://www.blogger.com/profile/03316180250760896480noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-24264497995302060022014-01-30T13:06:16.670+01:002014-01-30T13:06:16.670+01:00with VCC, GND, SCL, SDA connected, it should works...with VCC, GND, SCL, SDA connected, it should works.<br />Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-90182949814317753202014-01-30T13:03:44.868+01:002014-01-30T13:03:44.868+01:00i also want one more clarification !! my breakout ...i also want one more clarification !! my breakout board has cs pin which i have left unconnected. in the datasheet for spi it says that it should be pulled high. also i have left sdo pin unconnected . i see from the video that i ve the same breakout board such as yours!! any suggestions??Anonymoushttps://www.blogger.com/profile/14351086653129597761noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-78635761190297515242014-01-30T12:55:28.144+01:002014-01-30T12:55:28.144+01:00check that you have correctly initializated i2c.
c...check that you have correctly initializated i2c.<br />check your i2c connection.<br />try with other i2c device.<br />check with a logic analyzer.<br />read i2c registers and debug with those reading.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-90055049161561764592014-01-30T12:26:37.633+01:002014-01-30T12:26:37.633+01:00my program hangs at this line of twimaster.c
while...my program hangs at this line of twimaster.c<br />while(!(TWCR& (1<<TWINT))); <br /><br />. what could be the reason for this??? can u please help!!Anonymoushttps://www.blogger.com/profile/14351086653129597761noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-50378066379194166692014-01-30T12:04:33.229+01:002014-01-30T12:04:33.229+01:00if you can, use a logic analyzer to check what'...if you can, use a logic analyzer to check what's going on your i2c bus. at first use short cables (<30cm). use pullup resistor for scl and sda as suggested in the above picture.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-79115223824964760202014-01-30T11:58:42.627+01:002014-01-30T11:58:42.627+01:00i am pretty sure that my uart works. i ve tested w...i am pretty sure that my uart works. i ve tested with programs . can u suggest how to check this twi interface. i used a scope in scl pins. i could not get any variations. also how long can this twi wires be? will length be a factor? also ( iam very new) pls forgive,, Anonymoushttps://www.blogger.com/profile/14351086653129597761noreply@blogger.com