Page 1 of 1
I2C Output with HiTechnic Experimenter's Kit
Posted: 01 May 2011, 19:13
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 2
Thank you in advance,
Re: I2C Output with HiTechnic Experimenter's Kit
Posted: 01 May 2011, 19:50
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
Re: I2C Output with HiTechnic Experimenter's Kit
Posted: 01 May 2011, 20:38
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,
Re: I2C Output with HiTechnic Experimenter's Kit
Posted: 01 May 2011, 21:00
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.
Re: I2C Output with HiTechnic Experimenter's Kit
Posted: 02 May 2011, 17:00
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,
Re: I2C Output with HiTechnic Experimenter's Kit
Posted: 02 May 2011, 17:11
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.
Re: I2C Output with HiTechnic Experimenter's Kit
Posted: 02 May 2011, 17:19
by dimasterooo
yeah that was the problem, I added them in the sheet above. Thank you anyways
Re: I2C Output with HiTechnic Experimenter's Kit
Posted: 02 May 2011, 17:35
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
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.