Рет қаралды 27,706
Previously we looked at how to control servos using an Ardunio and JMRI ( • Servo Motor Control fo... ) and we've looked at how to feed data from your layout into JMRI using an Arduino with a sensor shield ( • Model Railway Sensors ... ).
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: github.com/LittleWicketRailwa...
Videos on Servos: • Servo Motor Control fo...
Videos on Sensors: • Model Railway 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
Ebay and Amazon Affiliate Links
(Full disclosure, as an Amazon Associate and Ebay partner I earn from qualifying purchases through these links and this helps to support the channel)
Arduino Mega:
amzn.to/3poEBQK
ebay.us/Zl3sDT
Mega Sensor Shield:
amzn.to/3rTq80V
ebay.us/M2VnYX
Servo Driver Board (PCA9685):
amzn.to/2NoTKo3
ebay.us/rVpaAJ
SG90 Servos:
amzn.to/2N3uzY4
ebay.us/Xvuu72
IR Sensors:
amzn.to/2LQJmVF
ebay.us/rnR5wn
Variable Voltage Power Supply:
amzn.to/3b4wtj9
26AWG Servo Cable:
amzn.to/3daEp55
ebay.us/L1q3FE
Crimping Tool:
amzn.to/3tRJXHE
ebay.us/XE2Dxl
Jumper Wires:
amzn.to/2N574Os
ebay.us/Ujpvxn
Chapters
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