Arduino Mega to control sensors

  • Dear mysensor users.

    I am looking into the possibility to use mysensors for controlling a model railroad track layout. I need to hook up many sensors, servos and relais. The Mega would be my Arduino of choice. To one Mega 32 Servos via 2 PWM driver boards, 32 relais and I would like to use the remaining pins for 32 occupation sensors like reed switch or hall sensors. At the end I would be transferring non standard messages but that is not the point at the moment.

    A second choice would be the Arduino Nano to hook up 16 sensors.

    I succeeded to get the Nano running, not the Mega.
    Than I realised that the Mega is using different pins for SPI.

    How would it be possible to use the Mega?


  • Mod

  • Thanks for the reply.
    With me it ONLY WORKS if CE is connected to pin D2 of the Arduino Mega.
    Several other pins did not work.
    Took quite some time to figure this out.

Log in to reply

Suggested Topics

  • 6
  • 12
  • 1
  • 5
  • 178
  • 1
  • 44