DIY Kids Traffic Lights with Arduino & Recycled Materials: Without Using delay()

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024
  • Full Tutorial with Construction Photos: www.stemmayhem...
    Here is the cardboard Traffic Lights we built for kids to use when playing cars or trains. This does not use the Arduino delay() function, so it can be added to any existing Arduino project you might have.
    This is an overview video where we show you how the Arduino traffic lights are working, we show you the equipment we used to make it, and we run through the code you can use to make it yourself.
    Here are the traffic lights on the Arduino Project Hub: create.arduino...
    You can download all of the code for free, and make these kids traffic lights yourself.
    I must stress, these traffic lights have been coded without the delay() function, which allows you to incorporate it into your own projects.
    We think these traffic lights are pretty awesome because of a few reasons:
    We didn't use the 'delay' function as a timer.
    We included a dial to change the green light time.
    Compact Design running on 6AA batteries.
    Made from Recycled Materials
    Very Low Cost to Make
    The lights are very simple and is designed for a simple 4 way intersection. The lights on the front and back (north and south) are the same, and left and right (east and west) are the same. So, when the light is green, it is green for north and south, and red for east and west. Then, the lights go orange then red, and then green for east and west.
    There was one variable for us, and that was how long the lights stayed green for. When playing cars it is pretty short, but for trains it was longer. We wanted to be able to control this on the unit easily, and not have to reprogram it every time we wanted it changed. So we implemented the Speed Dial.
    When you initially program the Arduino, you can set a few variables, and there are two variables for the speed dial. Min time and max time. When the dial is all the way to the left, the green lights will stay on for the time you set as 'Min', and when the dial is all the way to the right, the lights will stay green for the time you set as 'Max'. If the dial is in between, then it is just an increment from min to max.
    #kidsarduino #arduino #stem
  • НаукаНаука

Комментарии •