problem with the use of I2C. Help needed!!

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

problem with the use of I2C. Help needed!!

Postby lalos » Tue Oct 15, 2013 1:37 pm

Hi.

i'm trying to connect and iPod and a lego mindstorm brick . The iPod sends orders to the brick, in order to move the motor A or the motor B. The iPod sends one character as an order, for example, the character a for the motor A and the character b for the motor B. Then, the character is translated to an integer with the use of ascii and this integer is sent via I2C. My problem is that I don't know how to read this integer in java lejos using getData() and how to initialize the i2c sensor.

Could anyone, please, help me?

Thanks in advanced!!!
lalos
New User
 
Posts: 6
Joined: Tue Oct 15, 2013 1:27 pm

Re: problem with the use of I2C. Help needed!!

Postby gloomyandy » Tue Oct 15, 2013 1:49 pm

How are you connecting your iPod to the NXT?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3645
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: problem with the use of I2C. Help needed!!

Postby lalos » Tue Oct 15, 2013 2:00 pm

i am connecting the ipod to a camera connection kit which is connected to a teensy 2.0 microchip, which is programmed in arduino to use MIDI for translating from a character to an integer and to use i2c to transport the information.
lalos
New User
 
Posts: 6
Joined: Tue Oct 15, 2013 1:27 pm

Re: problem with the use of I2C. Help needed!!

Postby gloomyandy » Tue Oct 15, 2013 2:06 pm

Do you actually have all of the stuff working to get the iPod talking to the arduino? I'm not aware of anyone that has the NXT talking to an arduino. You may be better of asking on some of the arduino forums about the best way to do that. You may run into issues the the voltages used by the various devices. Can an arduino act as a an i2c slave device? It will need to do so, the NXT can only be an i2c master.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3645
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: problem with the use of I2C. Help needed!!

Postby lalos » Tue Oct 15, 2013 2:17 pm

Yes, the IPod can talk to the Teensy but I don't know how Teensy (which goes with I2C to the brick) can talk to the leJOS program at the NXT.
I can assure this because before iPod was able to send the orders to the teensy and this one was able to send them to the NXT IF it is programmed with labView. Now I'm trying to change labView to leJOS because I had some memory issues.
I would appreciate an advice or a guide to know how I can implement I2C at my program
lalos
New User
 
Posts: 6
Joined: Tue Oct 15, 2013 1:27 pm

Re: problem with the use of I2C. Help needed!!

Postby gloomyandy » Tue Oct 15, 2013 4:34 pm

I can only suggest that you search this forum. There have been many posts describing how people have connected various types of devices to the NXT using i2c. You should also look at the various sample programs and at the leJOS source code (look at the source of the various i2c based sensor drivers to see how to connect and talk to an i2c sensor). Did you have this device working talking to the NXT when using Labview, or was the device talking to a PC?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3645
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: problem with the use of I2C. Help needed!!

Postby lalos » Wed Oct 16, 2013 1:29 pm

We have this device working talking to the NXT when using Labview.
lalos
New User
 
Posts: 6
Joined: Tue Oct 15, 2013 1:27 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 3 guests

more stuff