RC Truck and Construction  

Go Back   RC Truck and Construction > RC Truck's Ag and Industrial Equipment and Buildings > Scale Buildings, Warehouses and Structures.

Scale Buildings, Warehouses and Structures. If you have buildings and other structures that you have built to use with your Rc's here is your place to share them.


 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 08-12-2021, 02:44 PM
dremu dremu is offline
Newbie
 
Join Date: Aug 2019
Posts: 135
dremu is on a distinguished road
Default Re: Traffic Light

Sweet!

I'm a big fan of the 'dweeno, use them in most of my projects to drive lighting or extra controls (not least as they're really easy to interface to my RX of choice, Flysky using iBus.)

Anyway, to your project, a thought would be that you could add switches (or magnetic sensors or whatever) for the streets, or crossing if you're doing rail, whatever. Most any dry sensor is easily added with pinMode(x, INPUT_PULLUP), and then you just digitalRead(x) to check it (okay, fine, you should debounce, but you get the idea, and there's tons of tutorials for that in detail.)

Then you can say "this busier street stays green until there's somebody stopped at the less busy side of the intersection" and go through the yellow-red for the main street, and then open up the side street, like thoroughfares work in the real world. We did this in an electronics tech class I took a bazillion years ago, before Arduinos were a thing. Fun thing was we had a guy there that worked for the state DOT, so he told us about how they cut into the tarmac to install the magnet sensors, etc, made it more real world and less just blinky lights.

Anyway, a thought. If you've already considered and/or know all this already, apologies, don't mean to talk down to anybody, I just tend to blather on some any time the word "microcontroller" appears =))

-- A
__________________
I mean, how hard can it be?
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:46 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.