Willkommen bei MattzoBricks Foren Sensors Configuration in Rocrail

Ansicht von 2 Antwort-Themen
  • Autor
    Beiträge
    • #7333
      almogualmogu
      Teilnehmer

      I have returned to the Lego model project with Mattzo. I have built an MLC with a wemos d1 mini.
      At the moment I have managed to get two traffic lights and 2 intersections working (after a lot of hitting with rockrail).
      According to the code, port D6 and D7 are sensors. I have tried Hall sensors, with a positive and negative cable (in this case the status LED lights up) but I can’t get anything, and I think the problem is in the Rocrail configuration.
      In my case, the address that the monitor gives me in VSCode is 50928, which is how I have it configured for the servos and traffic lights, but I don’t know how to configure the sensors.

      I am carrying out tests to little by little implement everything and get something working.
      I also tried to connect a PCA9685, but without success, since I don’t know much about programming and even less about Rocrail. time to time.
      So, I will try to be quite active.

      P.S.: everything I get, I will save it to later put it in Spanish and with instructions for other people in Spanish.

      • Dieses Thema wurde vor 1 Jahr, 4 Monaten von almogualmogu geändert.
    • #7607
      Matthias RunteMatthias Runte
      Administrator

      Welcome to Mattzobricks! You should try digital sensors instead of Hall sensors. We recommend reed sensors. I recently posted a video about sensors on the Youtube Channel, and I have also put some work into rewriting the sensor page.

      Please check out the SENSOR WIRING CONFIGURATION in the MattzoLayoutController configuration. There you will find the sensors that are defined for your controller. The first sensor in the array has Rocrail port 1, the second 2 etc. This is hard-wired in the code. You should also try to monitor the MQTT queue using mosquitto_sub. This also helps to find errors.

      Good luck!

    • #7669
      almogualmogu
      Teilnehmer

      I have posted an answer but it does not appear, when I post it again it tells me that it is already there but I do not see it, otherwise I create another section.
      I had uploaded some screenshots to know how to configure the sensors and so I could see what I get on the VSC monitor

      • Diese Antwort wurde vor 1 Jahr, 3 Monaten von almogualmogu geändert.
Ansicht von 2 Antwort-Themen
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.