|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Help with 2010 Accelerometer & I2C
Yeah the address given in the Sensor Guide says 0x3A, and I figure its all in 8bit for the WPI Function, so the 0x1D wouldn't work with that but 0x3A would?? I really don't know I2C or WPI's implementation of it, so I don't really know. I'm going to keep playing with it tonight.
I also just found the register map, didn't see it in the datasheet when I worked on it last, don' know how I missed it. The biggest issue I am having now is whenever I call the read or write function the robot freezes up, and my console output shows nothing. This is both when I try to perform a read or a write.... |
|
#2
|
||||
|
||||
|
Re: Help with 2010 Accelerometer & I2C
Any luck so far? It would be awesome if you got this working.
|
|
#3
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
Quote:
This bug would prevent the accelerometer from working. |
|
#4
|
|||
|
|||
|
Yippeee!! everything is finally working....We re imaged the Crio, made sure 'ALL' the updates were applied to the driver station and the development laptop, compiled then downloaded the BuiltinDefaultCode.out file.
Then we added Joe's accelerometer code and fixed the I2C.cpp file. and all still worked. We had some problems with the IterativeDemo but I we'll revisit that later. The BuiltinDefaultcode is what we will base our robot code on. Thanks to all especially Joe Hersh for all the info and his patience..They don't pay you enough...Every one should send Joe a starbucks gift card so he can buy enough coffee to keep him awake when he sending those responses at 3 AM.. Brian C |
|
#5
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
Quote:
Thanks |
|
#6
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
Quote:
It will be officially included and supported in the next C++ update. |
|
#7
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
For some reason I keep receiving 0.0 from GetAcceleration(); am I instantiating the accelerometer correctly?:
ADXL345_I2C(4, ADXL345::kRange_2G) (assuming the digital sidecar is connected to slot 4) |
|
#8
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
We attached an oscilloscope to the bus and noticed that the data returned from the slave accelerometer is 0 for all three transactions (x, y, z); could it be attributed to some sort of a power saving feature which is not disabled?
|
|
#9
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
Quote:
If you fix the I2C library it should start working for you. |
|
#10
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
How would I patch wpilib? I could not find anything useful (besides the description of the bug).
|
|
#11
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
Quote:
-Joe |
|
#12
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
Will this patch be in a team update soon? It's not good that teams already have gone this long with broken support for something in the KoP...
|
|
#13
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
I'm not sure... I have no control over release schedules.
Quote:
-Joe |
|
#14
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
Quote:
I get the "no such file or directory" error. |
|
#15
|
|||
|
|||
|
Re: Help with 2010 Accelerometer & I2C
Quote:
What file or directory exactly does it fail on? -Joe |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2010 Accelerometer Documentation? | JDM | Sensors | 13 | 18-01-2010 12:42 |
| Accelerometer Help? | elbuo | Programming | 16 | 19-01-2009 13:01 |
| accelerometer help!! | wildcats | Electrical | 2 | 18-01-2009 15:51 |
| Accelerometer Help! | Questions4mQ202 | Electrical | 4 | 15-01-2009 19:44 |
| Accelerometer help | Red Mage | Programming | 3 | 30-01-2008 18:49 |