Arduino, CMRI and JMRI - Part 1 - Combined Sensors and Servos

2 Просмотры
Previously we looked at how to control servos using an Ardunio and JMRI ( and we've looked at how to feed data from your layout into JMRI using an Arduino with a sensor shield (

A lot of people asked if it was possible to combine the two projects into a single package and the answer is yes! And in this video I'll show you how you can have servos and sensors both running from the same Arduino.

Sketch Code is here:

Videos on Servos:
Videos on Sensors:

In the servo videos we connected to JMRI using a system called CMRI and we'll be using that again, except in this series of videos we'll explore what CMRI can do a bit further by adding outputs that could be used to control lighting or motors. We'll also look at the benefits of connecting multiple Arduinos, called nodes in CMRI, together so that we can have small nodes placed around the layout serving their own areas.

Links to other videos in the series:
Arduinos, CMRI and JMRI - Part 2: To be released
Arduinos, CMRI and JMRI - Part 2: To be released

Affiliate links to components:
Arduino mega -
Sensor shield -
Power supply -
IR sensors -
26AWG servo cable -
Servo driver (PCA9685) -

00:00 - Introduction
02:45 - Components
03:33 - Step 1 - Assemble components
06:00 - Step 2 - Upload Arduino sketch
09:33 - Step 3 - Setup CMRI connection in JMRI
11:15 - Step 4 - Setup sensors and turnouts in JMRI
12:40 - Summary
Комментариев нет.