Digital Town
Digital Town
  • 120
  • 186 743
#120 Arduino C++ Lesson 19 DC Motor Control, direction and speed using l298N motor driver
This lesson shows how to use the L298N motor driver board to control motor direction and speed when combined with PWM (Pulse Width Modulation).
As always the code uses millis for timing so is non-blocking state machine code.
For more information, code and circuit diagram visit www.digitaltown.co.uk/lessons.php
มุมมอง: 76

วีดีโอ

#119 Arduino C++ VL53L0X Time of Flight Distance Sensor
มุมมอง 173วันที่ผ่านมา
Arduino C tutorial showing how to use a single or multiple VL53L0X sensors including a simple method to calibrate the sensor. Tutorial deals with some of the issues with libraries as well as some of the issues and differences between different VL53LX packages. For more information, circuit digrams and sample code for the VL50L0X visit the resource page at: www.digitaltown.co.uk/components.php#V...
#118 Arduino C++ nowRail model railway control - nowRail LCD touch screen loco controller
มุมมอง 384หลายเดือนก่อน
This video shows how to set up the nowRail LCD touch screen loco controller. This screen was designed with DCC-EX as the base station however it also runs with the NCE CAB bus via the nowRail interface. The screen controller costs about £15 to build and is able to store up to 200 locos details. More information, connections and code are available free at: www.digitaltown.co.uk/nowRail.php
#117 Arduino C++ nowRail model railway control - Servo control with PCA9685
มุมมอง 289หลายเดือนก่อน
From version nowRail version 1.1.0 speed control has been added to PCA9685 servos. This means that users can set the time they want the servo to complete the operation in. This video shows how to implement PCA9685 servo in nowRail with and without speed control. More information and circuit diagrams are available at: www.digitaltown.co.uk/nowRail.php
#116 Arduino C++ Lesson 18 Project design, choosing sensors to build a model railway speedometer
มุมมอง 383หลายเดือนก่อน
In this lesson I will go through the steps and considerations when choosing sensors for a project, in this case a speedometer for a model railway. Issues such as sensor speed v's ability to physically build the project. This project uses the 1602A I2C screen combined with a debounced button and 2 IR sensors. As always the code uses millis for timing so is non-blocking state machine code. For mo...
#115 Arduino C++ Lesson 17 1602A I2C LCD screen and String padding
มุมมอง 3602 หลายเดือนก่อน
A basic introduction to connecting the I2C version of the 1602A LCD screen as well as how to deal with removing old data from screen and methods for string padding. As always the code uses millis for timing so is non-blocking state machine code. For more information, code and circuit diagram visit www.digitaltown.co.uk/lessons.php
#114 Arduino C++ Intergrating buttons and LED's with DY-HV20T DY-HV8F DY-SV8F DY-SV5W MP3 Players
มุมมอง 7902 หลายเดือนก่อน
This video shows how to integrate buttons and led sequences into an MP3 sound project using the DY-HV20T DY-HV8F DY-SV8F DY-SV5W MP3 Players. The examples given use 2 buttons, the busy pin and an external LED but can be expanded. Based on a model railway style project one button plays the background sounds in a random order while the other button plays a single track that interrupts the backgro...
#113 Arduino C++ nowRail model railway control - Background sound using MP3 players with nowRail
มุมมอง 2662 หลายเดือนก่อน
This video shows how to implement background sounds onto your layout with the built in MP3 control within nowRail. The system works with the 10w DY-HV8F and DY-HV20T, the 5W DY-SV8F and DY-SV5W boards as well as a few others. Single tracks can be played or multiple tracks played randomly as well as volume control. More information and circuit diagrams are available at: www.digitaltown.co.uk/now...
#112 Arduino C++ DY-HV8F, DY-HV20T Mp3 player module with ESP32, Arduino UNO and Arduino Mega 2560
มุมมอง 1.2K2 หลายเดือนก่อน
This tutorial shows how to trigger the next track to play using the busy pin with communication over Serial (UART). An extra sketch has been added to the ZIP file with an improved random time of play as well as a bug fix on sketch v2 The commands sent build on the lessons learnt with the DY-SV5W with the UNO/Mega at: th-cam.com/video/e7qd2Nu3Iss/w-d-xo.htmlsi=lhhR2iO-sVUXBeED and the ESP32 vers...
#111 Arduino C++ - Lesson 16 Creating a multi mode button with Arduino Uno
มุมมอง 4053 หลายเดือนก่อน
Lesson 16 of this Arduino C course shows how to use a single button to select different modes allowing different types of code to run in a single sketch. In the examples the mode button cycles through different LED patterns but the code can be adapted for any situation where multiple modes are required. As always the code uses millis for timing so in non-blocking state machine code. For more in...
#110 Arduino C++ - Lesson 5B Using toggle switches with the Arduino Uno
มุมมอง 2974 หลายเดือนก่อน
This video is an extra video added to the series to show how to use a toggle type switch with the Arduino UNO rather than the usual push to make switches that come with the kits. All the code is non blocking (state machine, millis()) based. For more information, code and circuit diagram visit www.digitaltown.co.uk/lessons.php
#109 Arduino C++ - JQ8900 MP3 Player
มุมมอง 5145 หลายเดือนก่อน
This video shows how to use the JQ8900 MP3 Player with an Arduino UNO, Arduino Mega 2560 and ESP32. The board allows MP3 files to be downloaded directly to the board through the USB connector. The tutorial provides 3 sketches that cover most commonly used functions as well as showing how to write your own. For more information, sketches, circuit diagrams, pin outs and datasheet go to: www.digit...
#108 Arduino C++ nowRail model railway control - PCA9685 LED's control and effects
มุมมอง 3715 หลายเดือนก่อน
Video shows how to set up LED's with PCA9685 boards and nowRail. nowRail has fire flicker, gas light and arc welder effects built into the system. Each LED can be controlled by as a DCC accessory, either as an individual LED or as a group. For more information, circuit diagrams as well as the full function list visit: www.digitaltown.co.uk/nowRail.php
#107 Arduino C++ Lesson 15 - External interrupts reading digital signals
มุมมอง 2665 หลายเดือนก่อน
This lesson shows the process of reading digital data using interrupts. How to work out the timings of signals as well as translating them into the 0 and 1's that make up the packet of data. Although a DCC model railway controller is used for the example sample code is included in the lesson to turn another Arduino into the signal generator for testing. The various sketches work through stage b...
#106 Arduino C++ - Lesson 14 External Interrupts - Rotary Encoder
มุมมอง 2986 หลายเดือนก่อน
This lesson shows the basics of how an external interrupt is set up and used and how values are passed back to the main loop. The lesson includes 2 different versions of ways to use external interrupts with a rotary encoder. All code is non blocking, state machine style code. For more information, code and circuit diagram visit www.digitaltown.co.uk/lessons.php
#105 Arduino C++ - nowRail model railway control - NCE Cab Bus
มุมมอง 2786 หลายเดือนก่อน
#105 Arduino C - nowRail model railway control - NCE Cab Bus
#104 Arduino C++ - Lesson 13 - 28BYJ-48 Stepper motor with ULN2003 driver. Part 2
มุมมอง 2296 หลายเดือนก่อน
#104 Arduino C - Lesson 13 - 28BYJ-48 Stepper motor with ULN2003 driver. Part 2
#103 Arduino C++ - Lesson 12 - 28BYJ-48 Stepper motor with ULN2003 driver. Non blocking, no library.
มุมมอง 8096 หลายเดือนก่อน
#103 Arduino C - Lesson 12 - 28BYJ-48 Stepper motor with ULN2003 driver. Non blocking, no library.
#102 Arduino C++ - Lesson 11 Advanced Servo Control
มุมมอง 4276 หลายเดือนก่อน
#102 Arduino C - Lesson 11 Advanced Servo Control
#101 Arduino C++ - Lesson 10 Servos
มุมมอง 6466 หลายเดือนก่อน
#101 Arduino C - Lesson 10 Servos
#100 Arduino C++ nowRail model railway control - Version 0.7.2 Updates
มุมมอง 3276 หลายเดือนก่อน
#100 Arduino C nowRail model railway control - Version 0.7.2 Updates
#99 Arduino C++ - ESP32 mac address issues caused by ESP32 v3.0.0
มุมมอง 7157 หลายเดือนก่อน
#99 Arduino C - ESP32 mac address issues caused by ESP32 v3.0.0
#98 Arduino C++ - Lesson 9 Arrays and for() loop
มุมมอง 2597 หลายเดือนก่อน
#98 Arduino C - Lesson 9 Arrays and for() loop
#97 Arduino C++ - Lesson 8 Combining sensors and outputs part2
มุมมอง 2917 หลายเดือนก่อน
#97 Arduino C - Lesson 8 Combining sensors and outputs part2
#96 Arduino C++ - ESP-NOW changes and issues caused by ESP32 v3.0.0
มุมมอง 2K7 หลายเดือนก่อน
#96 Arduino C - ESP-NOW changes and issues caused by ESP32 v3.0.0
#95 Arduino C++ - Lesson 7 Combining sensors and outputs
มุมมอง 3267 หลายเดือนก่อน
#95 Arduino C - Lesson 7 Combining sensors and outputs
#94 Arduino C++ - Lesson 6 Reading analog pins with analogRead()
มุมมอง 3747 หลายเดือนก่อน
#94 Arduino C - Lesson 6 Reading analog pins with analogRead()
#93 Arduino C++ - Lesson 5 Reading digital pins with digitalRead()
มุมมอง 4137 หลายเดือนก่อน
#93 Arduino C - Lesson 5 Reading digital pins with digitalRead()
#92 Arduino C++ - Lesson 4 Controlling digital pins with digitalWrite()
มุมมอง 4197 หลายเดือนก่อน
#92 Arduino C - Lesson 4 Controlling digital pins with digitalWrite()
#91 Arduino C++ - Lesson 3 Controlling timings with if() and millis()
มุมมอง 4327 หลายเดือนก่อน
#91 Arduino C - Lesson 3 Controlling timings with if() and millis()

ความคิดเห็น

  • @patwilson8820
    @patwilson8820 14 ชั่วโมงที่ผ่านมา

    So glad you made this video! I've been experimenting with many similar chips and noticed fine differences. With these two in particular, I also spotted the differences in additional resistors and different chip on the back. In fact, I'm holding these two in my hand and the one labelled "DFPlayer Mini" has 4 resistors while the one labelled "MP3-TF-16P" (with no version specified) has 6 resistors! I think there are many people making variations on these to make them cheaper. Another commenter mentioned the real ones are from DFROBOT and that is definitely the way to go! I want to point out another difference I found in case it helps others. When wiring a speaker to SPK1 + SPK2, the "DFPlayer Mini" outputs only the left channel while the "MP3-TF-16P" outputs both the left+right channels.

    • @digitaltown5442
      @digitaltown5442 7 ชั่วโมงที่ผ่านมา

      Interesting info about the single channel play. I hadn't noticed that issue as I tend to record the MP3's in mono fpr these units.

  • @shakejones
    @shakejones 4 วันที่ผ่านมา

    Brilliant! Thank you for sharing mate 🙏🏻

  • @creativeyes3292
    @creativeyes3292 4 วันที่ผ่านมา

    i have no sound diffrences when i switch the equaliser

    • @digitaltown5442
      @digitaltown5442 4 วันที่ผ่านมา

      What command are you sending? I don't see a command for that in the data sheet.

    • @creativeyes3292
      @creativeyes3292 4 วันที่ผ่านมา

      @@digitaltown5442 0X7e 0Xff 0X06 0X07 0X01 0X00 0X05 0Xef and when i query the current equalizer it does say it is switched

    • @creativeyes3292
      @creativeyes3292 4 วันที่ผ่านมา

      @@digitaltown5442 0X7e 0Xff 0X06 0X07 0X01 0X00 0X05 0Xef and when i query current equalizer it does say it is changed

  • @pressedup
    @pressedup 7 วันที่ผ่านมา

    Amazing lecture!

  • @adamaglionby7438
    @adamaglionby7438 10 วันที่ผ่านมา

    Thanks for vid, just what needed, when needed it, what about using i2c multiplexer rather than change addresses?

    • @digitaltown5442
      @digitaltown5442 10 วันที่ผ่านมา

      I have them on the workbench but want to do some more tests before doing a video. It's a case of checking how the libraries react.

  • @Mason-DixonRR
    @Mason-DixonRR 13 วันที่ผ่านมา

    Where did you find the rotary encoder module with the push button? Is it called something different? 5:30

    • @digitaltown5442
      @digitaltown5442 13 วันที่ผ่านมา

      I think most encoder modules have the push button. They should have pins marked GND, + SW (switch), DT and CLK Also make sure the module is the screw thread type if you are using a case as they are easier to fit. Example at www.amazon.co.uk/RUNCCI-KY-040-Encoder-Development-Arduino/dp/B07SV5HHM5/ref=sr_1_2_sspa

  • @suranga273
    @suranga273 15 วันที่ผ่านมา

    Thanks a lot.

  • @Daniel-xl2qu
    @Daniel-xl2qu 15 วันที่ผ่านมา

    Thanks for all the advice.

  • @rushaljain6733
    @rushaljain6733 19 วันที่ผ่านมา

    Does GT911 require external Pull Up resistor for SDA/SCL or it has it with the set up ?

    • @digitaltown5442
      @digitaltown5442 19 วันที่ผ่านมา

      It worked without pull ups.

  • @olafliebeskind6597
    @olafliebeskind6597 20 วันที่ผ่านมา

    Thank you for the video and the script. I'm now running it on my Märklin Mobile Station 2. It works perfectly for servos, relays and LEDs. Thank you and greetings from Germany.👍🏻

  • @shakejones
    @shakejones 24 วันที่ผ่านมา

    Well done mate, thank you for sharing 🙏🏻

  • @HobbyHomeWorkshop
    @HobbyHomeWorkshop 25 วันที่ผ่านมา

    Very good, for my level. This helps me with the project I'm working on, but I would really like to see a video about handling multiple buttons.

    • @digitaltown5442
      @digitaltown5442 24 วันที่ผ่านมา

      Try this video for multiple buttons th-cam.com/video/kXDviSgM22w/w-d-xo.htmlsi=SFzY3vFfTkl6Tiop

    • @HobbyHomeWorkshop
      @HobbyHomeWorkshop 22 วันที่ผ่านมา

      @digitaltown5442 I think it helps me. I need to use a method to set a clock, MAX7219 matrices, display with animations, so I don't have to mess up the timing using delay(). Maybe I can work this holiday season. I will come back.

  • @jv3377
    @jv3377 28 วันที่ผ่านมา

    Nice job, I will use your timing setup. Salutations

  • @jv3377
    @jv3377 28 วันที่ผ่านมา

    Thanks Exactly the code I needed to understand the setup of command string. I tried to use DYplayer but no result in UART MODE. Salutations

  • @johnholdsworth5272
    @johnholdsworth5272 หลายเดือนก่อน

    Also I intend to hold the esp32 reset via the EN pin with a simple switch to grouund, so that while charging the ESP32 etc will be off until the EN is allowed to float to 5v by turning the switch off. Do you think thid eill work?. I got the idea from t3-ex-wifi on github. the lolin wemos esp32 on the rowland LCD /ESP32 borad has a charging circuit included, potentially making the whole arrangement neater.

    • @johnholdsworth5272
      @johnholdsworth5272 29 วันที่ผ่านมา

      Sorry just noticed the typos..meant to say "will this work"

  • @johnholdsworth5272
    @johnholdsworth5272 หลายเดือนก่อน

    If I use a dcc to nowrail converter will it update the throttle status?

    • @digitaltown5442
      @digitaltown5442 28 วันที่ผ่านมา

      No the throttle updates itself when being used but won't respond to other controllers. It would be possible from another nowRail controller but there can be issues when 2 controllers try to run the same loco.

  • @johnholdsworth5272
    @johnholdsworth5272 หลายเดือนก่อน

    Can I suggest you put a touchscreen reset in the touch setup code. I had a lot of problems getting the touch to work until I put a reset in the Touch setup. Admittedly I was using a rowland technology kcd touch screen with in built esp32 for convienience and had to remap the I2C pins THe code I used was a: pinMode(TS_RESET,OUTPUT); digitalWrite(TS_RESET,HIGH); The Rowland lcd has the rest connected to io13. Keep up the good work for a wireless train control system for those of us not wanting to use JMRI, or MQTT regards JH

  • @cdiperformanceparts4364
    @cdiperformanceparts4364 หลายเดือนก่อน

    😂😂😂😂😂😂😂😂😂😂😂😂

  • @davidluckman9936
    @davidluckman9936 หลายเดือนก่อน

    Question, do you need a resistor on every LED? Or could you put one Resistor between Ground and the return pin of the LED and just use one Resistor for the LED Section of the circuit? Just thinking it would make the circuit much simpler if this can be done, but don't want to fry LEDs in the process. Of course, not sure yet if some more of this comes into play in the next lesson yet...

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      Good question. I always stick to 1 each and it keeps clarity in the diagrams. I think you should be ok sharing a single resistor. I can't test as in hospital at the moment. Just give it a try. The LED will only be damaged with no resistor so I would just go for it.

  • @furk80
    @furk80 หลายเดือนก่อน

    thanks for sharing you user_setup file! did help me a lot

  • @klimenkor
    @klimenkor หลายเดือนก่อน

    Building a small Arduino-“scarecrow” to protect fruit trees from squirrels. I just got the board from Amazon with ZERO documentation. Your video will be very handy! Thank you!

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      That's a great idea! I'd be interested to know how it works as we have a squirrel problem.

  • @MrAmenthos
    @MrAmenthos หลายเดือนก่อน

    I coppied your code to my arduino but nothing happens after I turn it on.. should I trigger it somehow or it has to start playing after power on? also I had to rename the serial1 to serial because arduino nano have no serial1

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      You need to be running the Arduino UNO version of the sketch on www.digitaltown.co.uk/components18DYSV5W.php (Try example 5). This uses softwareSerial. Just changing the mega version and changing to Serial instead of Serial1 will not work as other parts of the coede and connections need to be changed.

  • @DjReserve1
    @DjReserve1 หลายเดือนก่อน

    Man, I'm using the library as stated, I have the same sensor, I cannot get this sensor to not fail intialization. I'm on a esp32, I have the sda and scl corrently pinned, I even connected the gpio01 and xshut with that also mapped out. GPT says I may need pull up resistors is this true? I have tried 3.3 and 5v both don't work even external power.

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      Just did a quick test using an esp32 dev module using Adafruit_VL53LOX library version 1.2.4 Example Sketch VL5310x and Vl5310x_continuos and both sketches worked first time. Didn't test the other examples. I only connected 3.3v to VCC, GND to GND SDA to SDA (pin D21 GPI021) and SCL to SCL (pin D22 pin GPI022) The library has changed since the version I used but in my tests it did work... maybe time for a new video.

    • @DjReserve1
      @DjReserve1 หลายเดือนก่อน

      @digitaltown5442 thanks I appreciate your testing. I'll give it another shot.. one last shot before I just give it up. Could be bad sensors but 2 bad sensors? Possibly...

  • @modelrailwaytheeasyway9743
    @modelrailwaytheeasyway9743 หลายเดือนก่อน

    Excellent I like the look of this thanks for sharing this project.

  • @dexiangli819
    @dexiangli819 หลายเดือนก่อน

    Awesome! thanks for the video, keep it up!

  • @andrewdonald2770
    @andrewdonald2770 หลายเดือนก่อน

    Looking good there Simon - thanks for publishing your work

  • @Fogerty1959
    @Fogerty1959 หลายเดือนก่อน

    Could you please put your 3D stl file on the website please

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      I shall upload them in a few days, just printing them all out to make sure I have the correct versions.

  • @ismzaxxon
    @ismzaxxon หลายเดือนก่อน

    I use broadcast mode. I also add simple encryption key which is checked before is use the code. Only so i can have multiple networks. I am not talking the ESP encryption.

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      I use a similar system on the nowRail project, simple but effective

    • @ismzaxxon
      @ismzaxxon หลายเดือนก่อน

      @digitaltown5442 a lot of solar panel monitors use broadcast mode. I found out the hardest, trying to debug my code, when it was really just other people's messages.

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      @@ismzaxxon That's useful to know

  • @lestaylor7767
    @lestaylor7767 หลายเดือนก่อน

    Many thanks for your video, to get over the problem with load for multiple servo's apply a separate 5v to the PCA9685. Rob at Little Wicket covers all options on using the PCA9685 and more www.youtube.com/@LittleWicketRailway I am keen to use your option with the ESP32 instead of my MEGA which also controls my DCC EX

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      The 5v supplied through the V+ pin is supplying the power to the servos, the issue was my power supply was too small. You can connect the power supply through the green connectors but it's a lot messier when building connectors on the layout, hence the reason for using the V+.

  • @alexandrepv
    @alexandrepv หลายเดือนก่อน

    Very good tutorial :) Do you have a connection diagram with the ESP32?

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      On the ESP32 dev module SCL is GPIO22 Marked D22 on dev module) and SDA is GPIO21 (Marked D21 on dev module)

    • @alexandrepv
      @alexandrepv หลายเดือนก่อน

      @@digitaltown5442 Thank you! It worked! :D

  • @riggziestrains8082
    @riggziestrains8082 หลายเดือนก่อน

    I just tried this and it is all working but for my LED light. It is not turning on. If I hit the row 0 top and bottom pins (volt and ground) with an ohm meter, I get a 1v then 0v then 1v, etc... so it is working; however, 1v is not enough to turn on the 12v led's????

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      If you are powering LED's you want the yellow signal (+) and black GND as your connections. A multimeter might struggle as it's passing a PWM signal. If you use normal leds you don't need any resistor, however if you want to power a 12v led you are probably going to need to get the PCA8685 to drive a transistor that turns the 12v on and off to the 12v LED

    • @riggziestrains8082
      @riggziestrains8082 หลายเดือนก่อน

      @digitaltown5442 i plan on retesting with normal leds... From arduino kits and if works go from there.thx for the reply!

    • @riggziestrains8082
      @riggziestrains8082 หลายเดือนก่อน

      @@digitaltown5442 Turns out I had the arduino connected to the V+ and not VCC so when I switched that, I have LED that light now... well blink!. So great start!. Now I have to figure out how to get multiple LED to just come on at different power levels... but off to figure that out. Thx for your tutorial!

  • @gedtoon6451
    @gedtoon6451 หลายเดือนก่อน

    Although the PWM is set with a 12 bit value, it does not mean there are 4096 steps of control. At a frequency of 50hz you get 25MHz/(50Hz * 4096) ≈ 122 steps. This is a far cry from the advertised 4096 steps!

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      I can only quote the PCA9685 datasheet that says: The PCA9685 has 4096 steps (12-bit PWM) of individual LED brightness control That said I find that the difference between steps is so small that even a 10 step difference would not be visable to the eye.

  • @michaelmatsumura422
    @michaelmatsumura422 หลายเดือนก่อน

    I tried several times and had no luck. How should the sensors look? Should both the red and green lights be on or should only the red light be on?

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      Have you run the first sketch that checks the button and IR sensors are working correctly?

    • @michaelmatsumura422
      @michaelmatsumura422 หลายเดือนก่อน

      @@digitaltown5442 Yes I did. I rebuilt the whole thing using a Nano rather than an Uno and still cannot get the values on the screen to change from 0. I wired the breadboard as illustrated in the video. Should both the green and red LEDs on the sensors be on or only red? Currently I only have the red LEDs on. When I pass an item in front of them, they flash green and return to red. Please help!

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      @@michaelmatsumura422 When you tested the sensors in sketch 1 what value did you get when the sensors are being blocked? With my sensors I got values below 50 so used a value of 50 or less to trigger the timing set in the variable int isSensitivity = 50; If your sensors when triggered give a value greater than 50 you will need to increase this value. Or you may be able to adjust that value with the pot on the board. Regarding the red leds...my boards don't have a red led. I do see a green led light up when the unit gets triggered and go off when it's not but colurs of led are not standard across the boards... probably whatever they have in stock when they build a batch.

  • @iantcroft
    @iantcroft หลายเดือนก่อน

    Great video. I made a ballistic chronograph using a similar method. Enjoy the content.

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      Sounds incredible, what sensors do you use for a project like that?

    • @michaelmatsumura422
      @michaelmatsumura422 หลายเดือนก่อน

      I tried several times and had no luck. How should the sensors look? Should both the red and green lights be on or should only the red light be on?

  • @shakejones
    @shakejones หลายเดือนก่อน

    Great video+explanation+presentation! Thank you for sharing! Well done mate - NEW SUB 🙏🏻

  • @feendios5772
    @feendios5772 หลายเดือนก่อน

    ¿ this module can play very fast when press button? i saw xtronical channel is using esp32 with internal DAC that is much faster than other modules that i tested , you recomend this module for games that requires a fast response sound on event ? thank you

    • @digitaltown5442
      @digitaltown5442 หลายเดือนก่อน

      Any board that needs to read from a card or memory will always have a slight lag. For a game I would look to the xtronical internal DAC method with small sound files im memory as the sound timing for games should be very accurate.

  • @philnewman1110
    @philnewman1110 หลายเดือนก่อน

    Excellent video, thank you so much, I will be on this first thing tomorrow, thanks again!

  • @Juan-zc2jq
    @Juan-zc2jq หลายเดือนก่อน

    Thank very much, excellent information,

  • @guildedpickle4755
    @guildedpickle4755 2 หลายเดือนก่อน

    Brilliant lesson. Absolutely masterful teaching and useful information. The possibilities are endless with being able to separate the timers. Thank you

  • @brucenelson7451
    @brucenelson7451 2 หลายเดือนก่อน

    very nice use of arrays and non blocking code, it has got me thinking of how to improve some of my code, thanks.

  • @lestaylor7767
    @lestaylor7767 2 หลายเดือนก่อน

    Many thanks 👍

  • @paulraggett7837
    @paulraggett7837 2 หลายเดือนก่อน

    Once again thank you Simon.

  • @WiggyRussell
    @WiggyRussell 2 หลายเดือนก่อน

    Excellent video, good tip re the voltage divider - thank you. I think I already know the answer, but thought I would ask….. Would it be possible to play the second sound whilst the first is still playing? i.e. keep the background sound playing

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      The board can only play one sound at a time, it would be nice if it could play two.

    • @WiggyRussell
      @WiggyRussell 2 หลายเดือนก่อน

      @ thank you - I thought as much, but it was worth checking. All the best

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      @@WiggyRussell If you want to be able to play multiple sounds at the same time you could try the DAC audio library for the ESP32 by Xtrinical at www.xtronical.com/the-dacaudio-library-download-and-installation/

    • @WiggyRussell
      @WiggyRussell 2 หลายเดือนก่อน

      @@digitaltown5442 Thank you, I’ll take a look

  • @danielma2824
    @danielma2824 2 หลายเดือนก่อน

    hello can you help me ?? I have the DY-SV8F and I would like to control it with Arduino Uno with UART. I have tip 1.2 on off and 3 on unfortunately it doesn't work

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      Which sketch do you start to see errors? Did sketch 1 work with the buttons and busy pin? Did you test sketch 2 to make sure uart is connected the right way round. Tx -rx with voltage divider.

    • @danielma2824
      @danielma2824 2 หลายเดือนก่อน

      @@digitaltown5442 I did sketch 2 with the voltage divider.. and then code arduino dyhv8 and the mp3 are made with 00001.mp3 and so on tip is 3 on the others and it doesn't work

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      @@danielma2824 Start with the first sketch, don't worry about the buttons. Just make sure the busy pin is reading HIGH when no track is playing. That checks the GND and busy pin connection. If that is succesful move on to sketch 2. Make sure you have the TX and RX connected to the correct pins.... and the GND Also check the formating of the SD card. It needs to be FAT32.

  • @Mokkers_stuff
    @Mokkers_stuff 2 หลายเดือนก่อน

    Little bit confused about the power for the leds. You aren't using the red connections, only ground and signal. So how does applying voltage to the external power connector on the PCA board help?

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      The signal from the PCA9685 board is powered from the external power connection if available or the VCC when not available. With a single board of LED's it won't make too much difference, but if you have a lot of boards working together the signal pins between them will start to draw more power than your Arduino5v can supply.

  • @gmmc_84
    @gmmc_84 2 หลายเดือนก่อน

    Спасибо. А узнать на каком чипе экран, кроме как экспериментальным путём, больше нельзя?

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      It depends who you buy the screen from. Some sellers seem to know exactly what they are selling. However I have had some, especially Aliexpress when the actual seller does not seem to know so there are often a few trials involved.

  • @martinIsaac-o6s
    @martinIsaac-o6s 2 หลายเดือนก่อน

    Great video. Thanks !! How would i trigger a specific track from an input trigger? Ie - a train horn sound from a horn button that would interrupt the rest of the soundtracks. I'm having trouble with where to integrate the button pin hi/low digitalread

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      If you take a look at the code in the video for the DY-HV8F th-cam.com/video/TxMwZyBVwEg/w-d-xo.htmlsi=4hvxVNIMo5jV7Tph (They use the same instructions) you will see in example 3 how you can set it to play random tracks at random intervals... written specifically for model railways. If you then look at the video on deboucning buttons th-cam.com/video/kXDviSgM22w/w-d-xo.htmlsi=tHyYOzsv5lDepV16 Take a look at example 4 in the code and change if (buttonPress > 0) { //only run this if a button is pressed buttonMillis = currentMillis; if (rightBlueLEDState > 0) { //if it is pressed change the state of the blue LED rightBlueLEDState = 0; } else { rightBlueLEDState = 1; } digitalWrite(rightBlueLED, rightBlueLEDState); //turn LED on/off } to something like if (buttonPress > 0) { //only run this if a button is pressed buttonMillis = currentMillis; int soundTrack = 2; playTrack(soundTrack); } This will cause the debounced button to play whatever track you have selected in soundTrack =...track to play The track will play once and when it finishes should resume playing the other tracks at random.

    • @martinIsaac-o6s
      @martinIsaac-o6s 2 หลายเดือนก่อน

      I wanted to tell you how much I appreciate your resource. Your videos very clearly and thoroughly expresses you inherent knowledge. Thank you! I'll send an update when I have one.

  • @lestaylor7767
    @lestaylor7767 2 หลายเดือนก่อน

    Help please, I see your channel and when I spotted the connection to DCC-EX thought I would give it a go but sorry to say it's not working. Thought this was me making a mistake but tried multiple times and also without making any changes to nowrail 03 and 04 but still come up with this error: "Compilation error: invalid conversion from 'void (*)(const uint8_t*, const uint8_t*, int)' {aka 'void (*)(const unsigned char*, const unsigned char*, int)'} to 'esp_now_recv_cb_t' {aka 'void (*)(const esp_now_recv_info*, const unsigned char*, int)'} [-fpermissive" - it means nothing to me. Could this be caused through a later version of Arduino IDE or board manager. The principal looks good and getting the Arduino MEGA etc (DCC-EX command centre linked to the ESP32 would be good. Any help would be appreciated.

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      HIi just use the latest version of nowRail, Version 1.0.1. as each version just gets more functionality and the odd bug fix. The issue is caused by a change to the ESP32 board library when it went to version 3 with changes that broke some of the esp functions. The later versions of nowRail can cope with both versions of the library.

    • @lestaylor7767
      @lestaylor7767 2 หลายเดือนก่อน

      @@digitaltown5442 many thanks. Looking forward to getting this working.

  • @neilcampbell6026
    @neilcampbell6026 2 หลายเดือนก่อน

    Thank you, but I am confused. when declaring unsigned long buttonDebounce; at top of the code, what is the initial value? when going through the loop the first time? How can it do the If statement? I did not compile and run code yet. I like your videos. Thanks.

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      If a variable isn't given a value at start up it's value is by default Zero, that value will be updated after the first press. There is a better video in the new lessons series at: th-cam.com/video/kXDviSgM22w/w-d-xo.html

    • @neilcampbell6026
      @neilcampbell6026 2 หลายเดือนก่อน

      @@digitaltown5442 Okay thank you. Living on the edge with variable defaults being Zero. :) Makes more sense now. I wonder though if that is good idea. Also, thank you for always finding ways to not use "delay".

  • @DudeNuzzo
    @DudeNuzzo 2 หลายเดือนก่อน

    Nice concept using ESP-NOW as a wireless communications bus for a model railroad. Two questions. 1) I couldn’t find the code sketch or bill of materials for your wireless controller. Do you plan to share that? A full video on that build would be great! 2) In the video you mentioned not connecting the transmit pin from the Arduino to the ESP-NOW because of the voltage issues. How do you get information out of DCC-EX and back to the controller? Are you using a packet sniffer on the track power feed? Is the controller running some form of WiThrottle? Just curious how you’re doing that. Thanks again for the great info! D

    • @digitaltown5442
      @digitaltown5442 2 หลายเดือนก่อน

      I plan to do some videos on the wireless controller as well as a set of videos actually building the items rather than just a theoretical bench test. With the controller I wanted to give it some real testing first to check for any issues so it ran the layout at an exhibition for about 8hrs non stop so seems OK. I have a new one on the bench as a breadboard model so just need to finish some other videos first. It would be possible to just put a voltage divider to get the TX from DCC-EX but there is no information that is needed as DCC EX is being used to just create the DCC signals sent to the track. nowRail just sends it a list of commands for speed, and loco functions as well as any accessory decoder instructions. nowRail keeps track of everything it's done with data being stored to an external EEPROM as needed. On my layout the only accessory decoder is for the Traverser, mainly because I built it and it works so why change it. The rest is controlled directly from the turnout panels sending messages directly to the nowRail node on the individual board so the plan is to do videos on the different parts of the build.

    • @DudeNuzzo
      @DudeNuzzo 2 หลายเดือนก่อน

      Thank you for the reply! I’ll look forward to your future work and any information about the controller. I’m currently using JMRI and DCC-EX with WiThrottles and various types of physical controllers in concert, and am always interested in new ways to control our trains. Thanks again, and glad the exhibition went well! Cheers! D