Go to Post Many students I have met will insist that nothing is better than FIRST robotics. And most people would agree that a ham sandwich is better than nothing. So does it logically follow that a ham sandwich is better than FIRST robotics? - tsaksa [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2015, 23:09
ProgrammerMatt ProgrammerMatt is offline
Programmer-Electrical-Mechanical
FRC #0228 (Gus)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Southington
Posts: 138
ProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really nice
Using I2C to get sensor data?

I'm having some issues with getting I2C to work on the Java library. I'm using a triple axis magnetometer -> https://www.sparkfun.com/products/10530

This is the code i have -> http://pastebin.com/Ad9pbuf0

I used the same hex commands from the sparkfun tutorial -> https://www.sparkfun.com/tutorials/301

0x02 Select mode register
0x00 Continuous measurement mode
0x03 Select register 3, X MSB register (Most Significant Bit)

Using the code above i get jumbled numbers back, and it does not update continuously.

Thanks,

Matthew Smith
__________________
2015-2016 CSA
Software Engineering Student @ Johnson & Wales University
Team 228, Gus Robotics Inc.
Facebook
FLL Mentor for 1107, Edison Eagles!
2015- CT State Champions
2012- WPI Finalist(Thanks 1884 and 549), Spirt, Best Website
2011- WPI Chairman's award winners!
2010- WPI Champions! (thanks 230 & 20), WPI Engineering Inspiration, CT Best Website, CT VEX Champions (VRC228, VRC228b) (21-1-0)
2009- QCC VEX Champions (VRC228) (11-0-0), Innovate Award (VRC228)
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2015, 22:59
mythbusterma mythbusterma is offline
Registered User
no team
 
Join Date: Nov 2012
Rookie Year: 2009
Location: ----
Posts: 10
mythbusterma is an unknown quantity at this point
Re: Using I2C to get sensor data?

As a matter of fact, I'm working on creating a class that will provide support for this particular sensor.

I won't be able to test it properly until I get mine in the mail, however I will post the code when I get it working (and hopefully submit it to SparkFun).
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi