I2C Output with HiTechnic Experimenter's Kit

Discussion specific to the intelligent brick, sensors, motors, and more.
Post Reply
dimasterooo
Posts: 135
Joined: 29 Apr 2011, 21:53
Contact:

I2C Output with HiTechnic Experimenter's Kit

Post by dimasterooo »

Hi there,

I recently got the HiTechnic Experimenter's Kit, and I've got it set up withsix LEDs connected to the output pins (B0 - B5) on a breadboard. i was trying to turn them on in different ways using one of the example programs, but I can't get some of the combinations, like turning the first four on, for example. So I wrote down all possible combinations, and tried to get them. Turns out I can't get 24 of them.

The attached images (they might also show up below, if everything works) show all the combinations I could think of, with the I2C addresses next to them, if I could find them. My question is (surprise surprise) if it's possible to achieve those other outputs and how?
Possible combinations vs. achieved combinations 1
Possible combinations vs. achieved combinations 1
Possible combinations vs. achieved combinations 2
Possible combinations vs. achieved combinations 2
Thank you in advance,
- Leon Overweel (aka. dimastero/ dimasterooo)

My blog: http://www.leonoverweel.com
Twitter: http://twitter.com/LayOn_OverWhale
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: I2C Output with HiTechnic Experimenter's Kit

Post by mightor »

Did you report this to HiTechnic? What programming environment are you using? If it's not NXT-G, can you reproduce it with NXT-G?

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
dimasterooo
Posts: 135
Joined: 29 Apr 2011, 21:53
Contact:

Re: I2C Output with HiTechnic Experimenter's Kit

Post by dimasterooo »

Thank you for the quick reply! I was using RobotC for this (hitechnic experimenter's kit experiment two - i removed the last if elses and wrote the address just before the "write" command) and I don't have NXT-G on my computer. One more thing I forgot to mention is that the whole thing starts repeating once I hit 40 -- so 0x40 = 0x00, 0x41 = 0x01 -- and give the exact same results. Should I send HiTechnic an email?

thanks,
- Leon Overweel (aka. dimastero/ dimasterooo)

My blog: http://www.leonoverweel.com
Twitter: http://twitter.com/LayOn_OverWhale
bullestock
Posts: 27
Joined: 29 Sep 2010, 19:34
Location: Denmark
Contact:

Re: I2C Output with HiTechnic Experimenter's Kit

Post by bullestock »

dimasterooo wrote:Hi there,

I recently got the HiTechnic Experimenter's Kit, and I've got it set up withsix LEDs connected to the output pins (B0 - B5) on a breadboard. i was trying to turn them on in different ways using one of the example programs, but I can't get some of the combinations, like turning the first four on, for example. So I wrote down all possible combinations, and tried to get them. Turns out I can't get 24 of them.

The attached images (they might also show up below, if everything works) show all the combinations I could think of, with the I2C addresses next to them, if I could find them. My question is (surprise surprise) if it's possible to achieve those other outputs and how?
I2C output addresses on HiTechnic Experimenters Kit 1.jpg
I2C output addresses on HiTechnic Experimenters Kit 2.jpg
Thank you in advance,
Unless I am missing something obvious, the 'missing' values are 0x0A, 0x0B, 0x0C, ..., 0x0F and so on.
dimasterooo
Posts: 135
Joined: 29 Apr 2011, 21:53
Contact:

Re: I2C Output with HiTechnic Experimenter's Kit

Post by dimasterooo »

yep, that was the problem. Thank you! Address 0x00A, B, C, D, E, F got the first six, 0x01A, ..., F, got the second, 0x02A, ..., F got the third and 0x03A, ..., F got the last; they were even in order! I've got images of the new list attached below (can't paste the whole thing here because it's too long :/). If it's helpful for anyone, I can post a link to the full image.

thank you guys,
Attachments
I2C output addresses on HiTechnic Experimenters Kit 2.jpg
I2C output addresses on HiTechnic Experimenters Kit 1.jpg
- Leon Overweel (aka. dimastero/ dimasterooo)

My blog: http://www.leonoverweel.com
Twitter: http://twitter.com/LayOn_OverWhale
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: I2C Output with HiTechnic Experimenter's Kit

Post by mattallen37 »

bullestock wrote:Unless I am missing something obvious, the 'missing' values are 0x0A, 0x0B, 0x0C, ..., 0x0F and so on.
Indeed, that is what it looks like.

@dimasterooo: 0x prefix means the number is a hexadecimal number. The possible values for each place are 0-F (instead of 0-9 for decimal). Your chart only uses 0-9, and no doubt that is your problem.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
dimasterooo
Posts: 135
Joined: 29 Apr 2011, 21:53
Contact:

Re: I2C Output with HiTechnic Experimenter's Kit

Post by dimasterooo »

yeah that was the problem, I added them in the sheet above. Thank you anyways
- Leon Overweel (aka. dimastero/ dimasterooo)

My blog: http://www.leonoverweel.com
Twitter: http://twitter.com/LayOn_OverWhale
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: I2C Output with HiTechnic Experimenter's Kit

Post by mattallen37 »

dimasterooo wrote:yeah that was the problem, I added them in the sheet above. Thank you anyways
looks like I was a bit late :oops:

Anyhow, you normally use exactly two digits to show a Hex number. For example, the interface can accept a range from 0x00 through 0x3f (not said 0x0 through 0x03f).
dimasterooo wrote:...they were even in order!...
Hex is a number system, and number systems values don't magically change values.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest