Hello Rudy, thank you so much for this, especially with a version for UK users, these are a really useful set of videos that you have put together. Look forward to your uploads, not sure i have mastered the programming side of things but they all make sense! Well done.
@robertschworm6036
4 жыл бұрын
Hi8 Rudy, Very nice sketch. Couple of points - Yes indeed, the sketch is designed in one direction. I suppose if you doubled up a couple of IF statements with the OR operator (||), it would take into account both directions. Also, as a car leaves the crossing, the leading of the edge of the car triggles the trailinig sensor, not the END of the car. Also it is possible to leave a car in the crossing with the gates up and the lights not blinking - an uprotected situation. I think a few more lines of code to cover this situation would be sufficient. Bob S
@joelvale3887
5 жыл бұрын
I've been waiting for a video like this one. One of the best videos for this project.
@sischsenalizacionferroviar345
2 жыл бұрын
Hello, excellent video. I did it and it works great. What I tried to do and couldn't is add a second servo to have two barriers
@jackhattingh8814
4 жыл бұрын
Hi there Rudy thanks for a terrific video. I have been searching for months on this very subject. Great job.
@karlkerstma7454
3 жыл бұрын
Ik hoorde in een van je filmpjes dat je de beschreven software ook kan downloaden. Waar kan ik deze vinden? Bvd Karl
@cadillacescalade5428
3 ай бұрын
Hi, Rudy i have this code set up with bell sound i can shortn the bell or even have full length bell, but here's my question Im wanting to remove the blink and add PWM fading leds in the place of the old one's would you mind demonstrating this this in a updated video or here ?
@rudyshobbychannel
3 ай бұрын
There won't be a video on that. There already is a video on how to create a fade. What you have to do is, where the blink changes from High to Low or vice versa, set the LED setpoint from 0 to 255 or vice versa, and add the fade timer to your code.
@leohamelinck3524
4 жыл бұрын
Hoi Rudy, Ik ben blij dat ik jouw tutorials heb ontdekt. Ik was bezig om de Nederlandse overweg voor de modelspoorbaan met een Arduino te maken. Toen ontdekte ik jouw filmpjes. Ik hoef dus het wiel niet uit te vinden, dat heb jij al gedaan,. Geweldig wat jij hebt gemaakt, mijn complimenten. We missen nog de bel ( grapje ). Bij mij doet de slagboom bij sluiten een paar graden terug voordat de bomen sluiten. Ligt dat aan de ( goedkope ) servo ? MVG Leo
@rudyshobbychannel
4 жыл бұрын
Leo, de software maakt dat stapje niet, het moet haast wel aan de hardware liggen, of aan speling in de mechanica?
@leohamelinck3524
4 жыл бұрын
@@rudyshobbychannel Dank voor je reactie en inderdaad met een andere servo is het probleem opgelost.
@gizmobar5514
4 жыл бұрын
Hello Ruby and HAPPY NEW YEAR, I was reading a comment about different directions on the crossing signal and that you do not have the time to do personal request but do thank you so much for the time you do give to the hobby. I am very new to arduino and do not understand the program language but ask if you will allow for another follower to aid us who are not so skilled in the language to write a sketch, that is if a follower will have the time to help. Benn watching your video's and love them for they carry so much information and brings life to model railroading. Again thank you very much.
@rudyshobbychannel
4 жыл бұрын
Open invitation to anyone who is able and wwilling to help. In youo r case yiu can just copy paste the whole switch case and add two the sensor inputs and it'll work from the other direction too. If you have multiple tracks you'll have to add a counter that counts passing trains up and down.
@gizmobar5514
4 жыл бұрын
Ruby, thank you so much for the fast reply and enjoy your video's very much and the information you sent me. Will put this to use. Happy New Year!!
@patrickmaloney6440
4 жыл бұрын
@@gizmobar5514 Hi there - see my reply to Joel Vale, above...
@selvakumarkumaresan870
4 жыл бұрын
Interesting videos from you which would help model railroaders a lot on getting realistic scenario. Do you have any idea on making crossing signal sounds at background?
@rudyshobbychannel
4 жыл бұрын
Have a look at these: rudysmodelrailway.wordpress.com/2015/02/15/the-arduino-sound-decoder-software-is-available/ rudysmodelrailway.wordpress.com/2015/02/11/arduino-dcc-function-servo-sound-decoder/
@BaronVonBiffo
5 жыл бұрын
I'm struggling to understand the need for the very complicated state transition approach you're using. Would it not be far simpler to replace all that with two functions, one to close the gate and the other to open it with the appropriate one called when the relevant sensor is triggered?
@rudyshobbychannel
5 жыл бұрын
Well ... that was actually meant to make things simpler, straightforward, write code almost without thinking by just following the steps.
@MartinBoltfagot
5 жыл бұрын
Dag Rudy, Allereerst bedankt voor alle video's. Heb je er wel eens aan gedacht dat je met een SD-Card (aangesloten op de Arduino) ook het geluid van een spoorwegovergang kunt weergeven. De luidspreker vlak bij de overgang komt realistisch over! ben benieuwd of je dit ook gaat gebruiken. gr. Martin
@rudyshobbychannel
5 жыл бұрын
Ja, ik ken de module ... is een leuke optie.
@jackhattingh8814
4 жыл бұрын
Hi there Rudy. After using your sketch i get an error reading on (switch transition), after case 4. The error message is "expected unqualified-id before 'switch'. Can you perhaps help, please?
@rudyshobbychannel
4 жыл бұрын
I can't reproduce this error here. I copy / pasted the code into the Arduino IDE and it compiles without errors. Can you try again, and if the error stays can you send a secreenshot of the Arduino IDE screen with the red line where it detects the error.
@sushildamle3449
Жыл бұрын
Dear Rudy, Thank you so much for the great job you are doing. I am strugling to understand, how to replace IR sensors with Ultrasound Sensor. Could you please give me guide lines or changes to be effected in code. Rest else is same (Arduino UNO, USS (HC-SR04), Servo (TowerPro SG90 Servo Motor). Many thanks in advance. Sushil Damle
@rudyshobbychannel
Жыл бұрын
The Arduino does not know what type of sensor is connected to an input, as long as it produces a logic 0 or 1 nothing has to change in the code, just do a digitlRead(pinnr).
@sushildamle3449
Жыл бұрын
@@rudyshobbychannel many thanks once again
@engineeringsriphah3852
5 жыл бұрын
Hi, i want to replace sensor 1 by GSM module. how i can replace it, kindly send me modified code. thanks in advance
@kaustubhponkshe6186
2 жыл бұрын
Does it work in both ways?
@rudyshobbychannel
2 жыл бұрын
Yes it can, but you'll have to add 2 sensors of course. If you have multiple train tracks also the code needs to be adapted. If you like to get that code, send me a note on the blog and I'll email you.
@joheuschkiel4489
5 жыл бұрын
Wat gebeurt er, als de trein niet van rechts maar van links komt ?
@rudyshobbychannel
5 жыл бұрын
Dan moet het State Transition Diagram aangepast worden zodat die situatie ook wordt afgedekt. Daarna moet de code natuurlijk uitgebreid worden met de extra states en transitions.
@joelvale3887
4 жыл бұрын
I'm having problems with the sensors, It only activates sensor two and the gates and lights when the engine crosses for the first time. If the engine comes from the opposite side and activates sensor one it does not turn the lights and gate until it reaches sensor two. Can you help me to solve this problem? Thanks.
@rudyshobbychannel
4 жыл бұрын
The current software was meant to work only in one direction. If yu need it to work in two directions change the states and transitions accordingly by adding the second sensor to the 'if' test.
@joelvale3887
4 жыл бұрын
@@rudyshobbychannel Thanks I will try this. Question: Is it possible to write a code for this system, whereby as long as the train is activating both sensors at the same time the lights and gates keep working and when the last sensor is clear the lights and gates stop working? I'm not that good for programming but mechanical things is my forte. Thanks.
@rudyshobbychannel
4 жыл бұрын
@@joelvale3887 I don't have time to do requests Joel. The whole purpose of the videos is that you would be able to do it yourself now. :)
@joelvale3887
4 жыл бұрын
@@rudyshobbychannel Thank you for your help. Have a great day.
@patrickmaloney6440
4 жыл бұрын
@@joelvale3887 Hi Joel, I've done exactly this as a first attempt at enhancing the original. Now it works in both directions, does not raise the barriers until the first sensor is clear, and also has a brief (definable) pause between the 2nd sensor being activated and the barriers raising (for really long trains). My next stage may be to add two more sensors right at the edges of the crossing that replace the delay before opening the barriers, by telling it that the crossing has been definitely cleared even though the 2nd sensor has been triggered. That way with short trains the crossing can open sooner than with long ones. Happy to share it if you like.
Пікірлер: 39