ArduinoMega + NXShield-M setupThis weekend I wanted to give the new ROBOTC for Arduino beta a go and what better platform to use than the ArduinoMega with the Mindsensors NXShield-M to interface with my Mindstorms hardware.

My setup was simple:

  • An NXT motor attached to Motor Port A1
  • An NXT Touch sensor attached to Sensor Port A1
  • An ArduinoMega with an NXShield-M
  • A Power Functions battery pack

The code is fairly simple, I am using a slightly modified version of the BitBanged master code I wrote for the ROBOTC for Arduino alpha tests and made it work with the new beta.  It’s a bit of a mess and could use a little tidying up. You can download it here: [LINK].  I shot a quick video to show you what it looks like.