​ ​ ​ ​ Lego NXT Hitechnics Sensors
Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 43

Thread: Lego NXT Hitechnics Sensors

  1. #1
    New Member
    Join Date
    Jan 1970
    Location
    Perth, Western Australia
    Posts
    20

    Question Lego NXT Hitechnics Sensors

    I have just updated my program editor software and see that someone has added sample files for communicating to hitechnics sensors. This would be brilliant for our Robocup Soccer robots and I will give it a go when we return to school in a few weeks. Does anyone know how to get in contact with the author of the sample files for a few helpful hints?

  2. #2
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    23,878

    Default

    Welcome to the PICAXE Forum.

    The example files were produced and added by ourselves, Rev-Ed. We will also be providing a datasheet / tutorial and offering other support for a variety of NXT Sensors. In the meantime this forum is probably the best place to ask questions.

    Lego NXT sensors use I2C for command and control so they are fairely straight forward to interface to.

  3. #3
    Senior Member
    Join Date
    Feb 2010
    Location
    192.168.1.2
    Posts
    125

    Default

    At least, most of the Lego sensors use I2C. The ones that don't are the light sensor, touch sensor, sound sensor and the new color sensor. You still could interface these with the Picaxe, but it wouldn't be with I2C.

  4. #4
    Moderator
    Join Date
    Jan 1970
    Location
    North Norfolk blow-in.
    Posts
    6,136
    Blog Entries
    1

    Default

    Just as an aside.

    I've just looked at Lego's NXT shop.
    One example of many:
    http://shop.lego.com/ByTheme/Product.aspx?p=9841&cn=17

    Beautifully manufactured,
    and I'm sure it works superbly,

    but, the price to build a robot !!!!

    I'm glad I don't have
    young, intelligent, technologically orientated,
    but economically naive kids.

    e

  5. #5
    Technical Support
    Join Date
    Jan 1970
    Location
    Bath,UK
    Posts
    6,417
    Blog Entries
    1

    Default

    Quote Originally Posted by NXTreme View Post
    ... and the new color sensor. You still could interface these with the Picaxe, but it wouldn't be with I2C.
    The Lego RGB sensor is not i2c, but the Hitechnic RGB color/colour sensor 2 does indeed work with i2c, so this is a good RGB colour sensor to use.
    PICAXE Technical Support

  6. #6
    New Member
    Join Date
    Jan 1970
    Location
    Perth, Western Australia
    Posts
    20

    Default

    thanks to all who responded. The Robocup soccer copmpetition has moved to pulsed balls and atm the hitechnics IRseekers V2 are the only working sensor option. We have never used I2C on the PICaxes before but the sample programs look pretty easy. As per usual the devil will be in the detail and the soccer robots are a pretty extreme programming environment. The robots will use the IRSeeker to find the ball, a HT compass for direction and some student manufactured LDR potential dividers for position on the field. If someone has looked at the IRseeker interface I would welcome assistance but will attempt tp pull together something based on the HT Color sensor and Compass samples. If I can post it here for review that would be great.

  7. #7
    New Member
    Join Date
    Jan 1970
    Location
    Perth, Western Australia
    Posts
    20

    Default

    first stupid questions ........

    I want to run a HT compass and a HT IRSeeker simultaneously.

    1. I have the standard address for the IR Seeker at 0X10 = $10 (read) and $11 (write). Can't find equivalent on HT site for Compass module. The sample files show same address for all HT examples. Is this correct ? Is the adress set by the master (PICaxe)?

    2. How do I set mode for IR Seeker to AC (write 41H = what?) - or is it not needed?

    ..... probably more to come

  8. #8
    New Member
    Join Date
    Jan 1970
    Location
    Perth, Western Australia
    Posts
    20

    Default

    Quote Originally Posted by eclectic View Post
    Just as an aside.

    I've just looked at Lego's NXT shop.
    One example of many:
    http://shop.lego.com/ByTheme/Product.aspx?p=9841&cn=17

    Beautifully manufactured,
    and I'm sure it works superbly,

    but, the price to build a robot !!!!

    I'm glad I don't have
    young, intelligent, technologically orientated,
    but economically naive kids.

    e
    The stuff is brilliant (and a lot cheaper if you purchase from the US). I teach engineering at a Australian high school and we use the NXT from 12 year old students onwards. Very hard wearing and simple for beginners but with a high ceiling as the students mature. It was great to see one of our teams use NXT (programmed in RobotC) + Hitechnics sensors to finish 3rd in the open category at the Robocup Nationals. The PICaxe soccer robots we build are faster and find the ball better but are much more fragile - if we can get the ht sensors to work on them they will be awesome. Great fun.

  9. #9
    Senior Member
    Join Date
    Feb 2010
    Location
    192.168.1.2
    Posts
    125

    Default

    Quote Originally Posted by Fast Freddy View Post
    1. I have the standard address for the IR Seeker at 0X10 = $10 (read) and $11 (write). Can't find equivalent on HT site for Compass module. The sample files show same address for all HT examples. Is this correct ? Is the adress set by the master (PICaxe)?

    2. How do I set mode for IR Seeker to AC (write 41H = what?) - or is it not needed?
    I don't quite understand Q. #1 but let me try explaining a bit. I don't want to make it overly simplistic. but better to start at the beginning . The HT IR Seeker V2 has various registers and depending on what your trying to read from it (IR Beacon direction, AC or DC signal strength ect.) you read a different register. Thus, it doesn't have one set register from which to read everything.

    The Compass sensor is different. Since your only reading back one value, a compass heading, you can fit it all in two bytes, or two registers. Those are registers 0x42 and 0x43. Then, with a bit of simple math, you can convert that to a word variable sized heading value. Or, if you don't need a very accurate heading, you can just use register 0x42 for a rough value. There are other registers for calibrating the sensor and such but they aren't needed for basic testing.

    If you want to use both sensors at a time on one I2C port, you will need to change the address. I'm not exactly sure how, there were instructions on the old NXTasy.org forums but it's gone now. I'd suggest asking on the MindBoards.net forums. I'm a somewhat regular visitor and most of the folks over there are as happy to help as the people here. Just ask nicely and don't expect them to do your homework and you'll come out alive .

    To change the the IR Seeker to AC mode you will have to write something to register 0x41, I think. Again, I'm not sure how/what but the guys at MindBoards will know. You could probably find the answers looking through the various code samples available online (HT website, RobotC forums ect.) but you'd may as well ask two questions for the price of one.

    I probably didn't answer your questions very well, but if I can help in any other way, just say so. The people on the Picaxe forum here are quite knowledgeable but if you have more detailed questions about the NXT sensors, why not ask on the NXT forum . One of the moderators over there is in to Arduino as well, so they're not set against other uControllers or robot brains. Have fun hacking this together, I hope all goes well and that your team does well during the next round of RoboCup!

  10. #10
    Senior Member
    Join Date
    Feb 2010
    Location
    192.168.1.2
    Posts
    125

    Default

    Quote Originally Posted by Technical View Post
    The Lego RGB sensor is not i2c, but the Hitechnic RGB color/colour sensor 2 does indeed work with i2c, so this is a good RGB colour sensor to use.
    Yes, sorry, I didn't specify which new color sensor. Thanks for clarifying.

    Quote Originally Posted by eclectic View Post
    Just as an aside.

    I've just looked at Lego's NXT shop.
    One example of many:
    http://shop.lego.com/ByTheme/Product.aspx?p=9841&cn=17

    Beautifully manufactured,
    and I'm sure it works superbly,

    but, the price to build a robot !!!!

    I'm glad I don't have
    young, intelligent, technologically orientated,
    but economically naive kids.

    e
    I agree with you, beautifully made, works well even if the graphical programming language it comes with is a bit clunky at times. I also agree on the price. It's priced at a much higher level than your average kid with your average allowance will make in a year or even two. If you buy the whole kit your getting a pretty good value but if you buy the parts individually it can get expensive.

    The nice thing about it though, is that you can just dive in and have fun. The quick start robot is a great way to get something "just working" in under an 45 minutes and the other included instructions are a great way to learn the basics. I had a couple reasons I choose the NXT as my entry in robotics/electronics.

    • I had lots of Lego and Technic pieces already, which meant I could build almost anything, if only I used my imagination.
    • It came with a graphical programming interface, which made it a lot less daunting to just jump in and learn the basics of programming, without having to worry about correct syntax and the like.
    • I didn't have to worry if the motor drivers where being overloaded, the resistors the wrong value or if I had enough power supply smoothing to keep the thing from constantly rebooting, it just "plugs and plays".


    While these things may seem a bit simple now, when your beginning it can be a bit hard to grasp the basics. Now that I have gotten past what a variable is and how to wire an LED, I actually prefer the Picaxe over the NXT for pretty much everything except for one thing, the fact that I can build and program a basic "start here" robot in half an hour.

    Don't want to start a war, just pointing out a few things . Oh and sorry to go OT...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •