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

2 Просмотры
Размещено
Previously we looked at how to control servos using an Ardunio and JMRI (https://youtu.be/ayOoUkdjHtg) and we've looked at how to feed data from your layout into JMRI using an Arduino with a sensor shield (https://youtu.be/yDWI4ujtuIY).

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: https://github.com/LittleWicketRailway/CMRI-Sensor-Servo-Hub/blob/main/CMRI_Turnouts_and_Sensors_Part1.ino

Videos on Servos: https://youtu.be/ayOoUkdjHtg
Videos on Sensors: https://youtu.be/yDWI4ujtuIY

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 - https://amzn.to/3nIqg0y
Sensor shield - http://ebay.us/ukg8mF
Power supply - https://amzn.to/3soC7Va
IR sensors - http://ebay.us/a7KzQI
26AWG servo cable - https://amzn.to/3bzp90P
Servo driver (PCA9685) - http://ebay.us/cpM6CS

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
Категория
Ардуино
Комментариев нет.