The Bored Robot
The Bored Robot
  • 23
  • 361 807
An Easy Way to Read All RC Channels at Once with Arduino
Thanks to the sponsor of this video:
www.pcbway.com
Get 10 PCB's for only $5
In this video, I demonstrate the easier way to read RC signals from a receiver with your Arduino Uno
Need the Code?
theboredrobot.com/pages/contact
Check out this Reference Desk Mat for Arduino:
amzn.to/3vO6QBl
Video Timestamps:
0:00 - Introduction
1:20 - Sponsor
1:51 - Step 1
2:36 - Step 2
2:50 - Step 3
3:07 - Step 4
3:40 - Step 5
4:07 - Conclusion
👉Subscribe for more robotics and engineering tips:
th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html
Share this video with a friend:
th-cam.com/video/MsUL-RY8ZrY/w-d-xo.html
Website:
www.theboredrobot.com/
Parts needed for this example:
Arduino Uno R4 - amzn.to/3V1odcD
Jumper Wires - amzn.to/47DLt30
Flysky Transmitter and Receiver - amzn.to/3SG4QTC
Previous referenced videos:
th-cam.com/video/WtOd8tsrJbs/w-d-xo.htmlsi=-zttYfYyMFJhh_Dk
th-cam.com/video/PdBS_W5tc-0/w-d-xo.htmlsi=Mn5_htFWBrAJMh0J
Connect:
Instagram - /theboredrobot
Twitter - @theboredrobot
Facebook - theboredrobot/
Pinterest - /TheBoredRobot
Disclaimer: This video contains affiliate links, meaning that if you make a purchase from one of the product links, I'll receive a small commission.
มุมมอง: 2 143

วีดีโอ

Turning Arduino's LED Matrix into a Serial Plotter
มุมมอง 2.3K4 หลายเดือนก่อน
In this video, I demonstrate how to use the LED matrix on the new Arduino Uno R4 Wifi, as a serial plotter and monitor. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl Video Timestamps: 0:00 - Introduction 0:34 - Wiring 0:42 - Example of turning the LED matrix into a serial monitor 0:50 - Code for the serial monitor example 1:59 - Limitation of serial monitor example 2:07 - Up an...
How to Change the X and Y Scale on the Arduino Serial Plotter
มุมมอง 11K6 หลายเดือนก่อน
In this video, I demonstrate how to change the scale of the X-axis and Y-axis for the serial plotter in the most recent version of the Arduino IDE. Note: In the video, I use the term "data points" to describe the length of the x-axis. What I actually meant is that the x-axis will only have a range of 50. There can be much more than 50 data points within this range. Check out this Reference Desk...
Synchronizing Motor Position with Encoders, PID Control and Arduino
มุมมอง 53K7 หลายเดือนก่อน
In this video, I demonstrate how to use PID Control to synch the positions of two motors with encoders by only using two interrupt pins on the Arduino. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl Video Timestamps: 0:00 - Introduction 0:33 - PID Control for a single motor 0:40 - Parts needed 0:46 - Pin out for the motor and encoder 0:58 - Wiring the circuit 1:16 - Arduino code...
Real-Time Data Visualization and CSV Logging with Arduino and Python
มุมมอง 12K8 หลายเดือนก่อน
In this video, I demonstrate how to send sensor data from the Arduino, plot the data in python, and then automatically save the data to a CSV file. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl Video Timestamps: 0:00 - Introduction 0:11 - Arduino Code 0:59 - Python Code 4:15 - Data Visualization in Arduino 4:25 - Data Visualization in Python 4:34 - Saving data to a CSV 👉Subscri...
Controlling 3 Stepper Motors with the AccelStepper Library for Arduino
มุมมอง 49K9 หลายเดือนก่อน
In this video, I demonstrate how to simultaneously control three stepper motors with the Arduino Uno and the Accel Stepper Library with discrete examples. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl Video Timestamps: 0:00 - Introduction 0:25 - Installing the library 0:45 - Parts needed 1:02 - Wiring the circuit 1:48 - Moving a single motor to a specific position (blocking) 4:...
Powering the Arduino Uno without a USB Cable
มุมมอง 6K11 หลายเดือนก่อน
In this example, I demonstrate how to power the Arduino Uno without the USB Cable. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a friend: th-cam.com/video/XDTr1hyQUtY/w-d-xo.html Website: www.theboredrobot.com/ Parts needed for this example: Arduino Uno- amz...
Controlling a Stepper Motor with a Remote Control and Arduino
มุมมอง 14Kปีที่แล้ว
In this example, I demonstrate how to use Arduino and remote control to control the speed of a stepper motor. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a friend: th-cam.com/video/vpqQozhfRqY/w-d-xo.html Website: www.theboredrobot.com/ Parts needed for thi...
Simultaneously Reading Two PWM Signals from an RC Receiver with Arduino
มุมมอง 13K2 ปีที่แล้ว
This is an example that demonstrates how to use Arduino to simultaneously read two RC signals (50 Hz PWM) using external interrupts. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a friend: th-cam.com/video/PdBS_W5tc-0/w-d-xo.html Website: www.theboredrobot.co...
Reading PWM Values from an RC Receiver using Arduino
มุมมอง 48K2 ปีที่แล้ว
This is an example that demonstrates how to use Arduino to read RC values (50 Hz PWM) using pulseIn() or external interrupts. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a friend: th-cam.com/video/UZKxUFkwCc8/w-d-xo.html Website: www.theboredrobot.com/ Part...
Controlling a DC Brushed Motor with the L298N Motor Controller
มุมมอง 3K2 ปีที่แล้ว
This is an example that demonstrates how to control a common, inexpensive DC brushed gear motor with the L298N motor controller board. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a friend: th-cam.com/video/9-QtE3RsSc4/w-d-xo.html Website: www.theboredrobot....
Simultaneously Controlling Stepper Motors with Arduino
มุมมอง 52K3 ปีที่แล้ว
This is an example that demonstrates how to simultaneously control two stepper motors with an Arduino Nano. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a friend: th-cam.com/video/Yvth5tLuXd4/w-d-xo.html Website: www.theboredrobot.com/ Parts needed for this ...
DIY Camera Phone Slider
มุมมอง 1.2K3 ปีที่แล้ว
Here's a build of an Arduino camera phone slider that uses two stepper motors for sliding and panning motion. Sliding is created through a lead screw and extruded rail Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a friend: th-cam.com/video/_tvxCVfMb60/w-d-xo...
Controlling a Brushless Motor with Arduino
มุมมอง 28K3 ปีที่แล้ว
This is an example that demonstrates how to control a brushless motor with a potentiometer and the Arduino Uno. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a friend: th-cam.com/video/_tvxCVfMb60/w-d-xo.html Website: www.theboredrobot.com/ Affiliate Links: B...
How to Control a Servo with Arduino
มุมมอง 1.8K3 ปีที่แล้ว
This is an example that demonstrates how to control a servo with a potentiometer and the Arduino Uno. This also shows how to measure the pulse width and duty cycle of the pulse width modulation (PWM) signal. Check out this Reference Desk Mat for Arduino: amzn.to/3vO6QBl 👉Subscribe for more robotics and engineering tips: th-cam.com/channels/MCGV13i2kt4VQuFBH6O2Vg.html Share this video with a fri...
CAD Models for Two Different Motorized Camera Phone Sliders
มุมมอง 2063 ปีที่แล้ว
CAD Models for Two Different Motorized Camera Phone Sliders
How to Create an Analog Signal with Arduino
มุมมอง 2.2K3 ปีที่แล้ว
How to Create an Analog Signal with Arduino
How to use the Arudino Uno to Read Analog Values from Sensors
มุมมอง 3.8K3 ปีที่แล้ว
How to use the Arudino Uno to Read Analog Values from Sensors
How to use Arduino Digital Write and "If" Statements
มุมมอง 3.1K3 ปีที่แล้ว
How to use Arduino Digital Write and "If" Statements
Walking Mechanism that Mimics the Human Gait
มุมมอง 18K3 ปีที่แล้ว
Walking Mechanism that Mimics the Human Gait
How to Use Digital INPUT and INPUT_PULLUP on Arduino
มุมมอง 38K3 ปีที่แล้ว
How to Use Digital INPUT and INPUT_PULLUP on Arduino
Building Circuits on a Breadboard
มุมมอง 6923 ปีที่แล้ว
Building Circuits on a Breadboard
Installing the Arduino IDE on Windows and Mac
มุมมอง 7103 ปีที่แล้ว
Installing the Arduino IDE on Windows and Mac

ความคิดเห็น

  • @girrrrrrr2
    @girrrrrrr2 วันที่ผ่านมา

    I have a question, I'm using a drv8825-ish in 1\32 micro step, and the motor moves terribly slow. What can I do to make it go faster? My ultimate goal is just a constant rotation speed which varies per motor so that I can use it in my drawing machine

  • @MrGerka0291
    @MrGerka0291 2 วันที่ผ่านมา

    How did you get it!??? Thank you very much!!!!

  • @NightEagle816
    @NightEagle816 3 วันที่ผ่านมา

    volatile long StartTime = 0; volatile long CurrentTime = 0; volatile long Pulses = 0; int PulseWidth void setup() { Serial.begin(9600); pinMode(RCPin, INPUT_PULLUP); attachInterrupt(digtalPinToInterrupt(RCPin),PulseTimer,CHANGE); } void loop() { if (Pulses < 2000){ PulseWidth = Pulses; } Serial.println(PulseWidth); } void PulseTimer(){ CurrentTime = micros(); if (CurrentTime > StartTime){ Pulses = CurrentTime - StartTime; StartTime = CurrentTime; } }

  • @rickperalta1921
    @rickperalta1921 3 วันที่ผ่านมา

    Excellent video - Thanks! Consider using unsigned math on micros() it simplifies the code (no if() needed). Consider a small state machine in the inyerrupts. On a rising edge save time and on falling edge compute delta and set a new system state. Thid avoids some complications and can help clarify the interface.

  • @karkashashankkumar253
    @karkashashankkumar253 6 วันที่ผ่านมา

    if yes can you provide the circuit diagram and code for it

  • @karkashashankkumar253
    @karkashashankkumar253 6 วันที่ผ่านมา

    can we control the position of stepper motor with tb6600 and potentiometer

  • @stevefox3763
    @stevefox3763 8 วันที่ผ่านมา

    Please could you release code for this that uses Rc PWM for the control input? My personal use requirement is 2 Rc channel input for 2 stepper controls so this would work great for me if I could use Rc input to control it. Steve.

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

      github.com/TheBoredRobot/TH-cam-Code

  • @user-cp3tm2nx5l
    @user-cp3tm2nx5l 8 วันที่ผ่านมา

    Oh wow this is incredible, I also manage to make the Y axis modification work on Mac, you just need to do the modification in VScode, thank you so much kind sir.

  • @YouTuber-xh1ej
    @YouTuber-xh1ej 9 วันที่ผ่านมา

    Thanks!!!!!

  • @sampamnl.8964
    @sampamnl.8964 10 วันที่ผ่านมา

    ขอบคุณมากครับ

  • @mbenj2023
    @mbenj2023 11 วันที่ผ่านมา

    Outputs were visibly not synchronised.

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

      Arduino not synchronous in general, but this did approach did the job for the application of getting two walking legs to sync up for another project. I do agree there is still plenty of room for improvement with adjusting gains or even a completely different method.

  • @Cfernanv
    @Cfernanv 12 วันที่ผ่านมา

    Quiero fabricar un afilador de herramientas, quiero agregarle un eje mas. Tres ejes que se muevan de forma lineal y un eje rotativo. Display para agregar valores en pantalla para el desplazamiento y valores de angulos para que gire la herramienta. Hay formas que me puedas ayudar?

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

      I had to use google translate on this one. The library works for additional motors. You'll just have to make sure you have enough pins on your Arduino.

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

    In this video and on your blog you show schematics and a PCB for two modules to control two motors but the Arduino code provided is only for one, I understand enough to see its only for one but don't have the knowledge to modify it myself for two and would likely just break the code, could you provide the code for the two modules please? I want to use this to control zoom and focus on a motorised lens for a HD FPV system on a Rc plane!

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

      My suggestions is to use the AccelStepper library. See video below. The code from this video you're commenting on can get a bit clunky when you start adding more motors. th-cam.com/video/QRCvC5xhJCw/w-d-xo.html&lc=UgzrPGWk_RqfpmJ7d-d4AaABAg If you add an additional channel from you remote control, then you can have it correspond with the additional motor.

    • @stevefox3763
      @stevefox3763 9 วันที่ผ่านมา

      @@TheBoredRobotLLC I got your email, yes it was me! I had no idea you had messaged me here, for some reason youtube turned off all notifications for comment reply's so I didn't know. Had a look at the linked video and that looks better, especially the position control which might be better for lens control than moving a motor then needing to return the control to 0 to halt it in that position but the video only talks about using Pots for control and not using Rc PWM. I want to use the Pots on my transmitter so I can use either continuous movement or position control as I would not be using Sticks. I am very comfortable with wiring but coding is not something I have been able to absorb and my limit is being able to inspect code and sometimes duplicate existing parameters for more of the same, 95% of attempts to modify further than that results in broken code :( How would I go about using the Accelstepper example but with RC pwm input instead of standard pots please?

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

      If you're able to read signals from the remote control, you can map that to another variable that would directly drive the variable that is responsible for the movement of the stepper motor.

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

    Is it possible to stop the motor at same time with different position?

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

      Yes, there are many ways to do that. There are stop commands within the library or send a signal to EN pin on the driver itself at the same time.

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

    thanks code works

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

    It's really helpful! Thank you!

  • @user-nv3sb5hr2f
    @user-nv3sb5hr2f 15 วันที่ผ่านมา

    thanks a lot

  • @visheshsaxena6199
    @visheshsaxena6199 17 วันที่ผ่านมา

    Hi great video. But my code does not work. It just displays a blank plot and says: Animation was deleted without rendering anything

    • @TheBoredRobotLLC
      @TheBoredRobotLLC 14 วันที่ผ่านมา

      Sorry to hear it doesn't work. If you want you can try copy and pasting the code: github.com/TheBoredRobot/TH-cam-Code

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

    Out of interest, if one motor is moved by hand when stationary, does the other motor follow the other still?

    • @TheBoredRobotLLC
      @TheBoredRobotLLC 17 วันที่ผ่านมา

      Yes, it should still work. If you ever tried to take the back of one of these motors off to expose the encoder, you're count should still go up if you move the encoder by hand. However, the motor shafts in this video are pretty hard to move by hand because of the gear ratio.

  • @seresmora
    @seresmora 21 วันที่ผ่านมา

    THANK YOU VERY MUCH, you saved me i was looking the documentation or arduino but couldn't find anything so thaaaank yoouuuuu

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

    Hello bro I'm doing a project that will use 3 stepper motors So far I'm still in my prototype for this project (Of 3 engines I'm only testing 1) I was using the L298n driver I saw this driver there and found it more interesting The A4988 It requires less wire connected to Arduino, enabling a greater number of motors connected at the same time, interesting I would like to know if you have seen any difference in practice using these drivers, if, for example, it is more interesting to use an L298N or an A4988 to keep a stepper motor on for longer A big hug from Brazil :)

    • @TheBoredRobotLLC
      @TheBoredRobotLLC 17 วันที่ผ่านมา

      I really haven't tested both of them extensively. Both have worked for my projects in the past. If one of the options can clean up your wiring, then it would make sense to go with that one.

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

    No matter what value I put on the useState sentence, the plotter stays as default on the x-axis. Any suggestions?

    • @Jesse-fh2ox
      @Jesse-fh2ox 23 วันที่ผ่านมา

      did you close the plotter and restart it after changing the value?

    • @emilianopelaezdiaz6263
      @emilianopelaezdiaz6263 21 วันที่ผ่านมา

      @@Jesse-fh2ox Yes, I did. I even restart the IDE, and also changed the value several times.

    • @TheBoredRobotLLC
      @TheBoredRobotLLC 17 วันที่ผ่านมา

      I really don't know of a solution to this without seeing the full picture of your system. Perhaps a reinstall might do the trick?

  • @GeekDetour
    @GeekDetour 26 วันที่ผ่านมา

    Ok.... but... why? ha ha ha. I was expecting a particular practical reason for that.

    • @TheBoredRobotLLC
      @TheBoredRobotLLC 26 วันที่ผ่านมา

      This video was made for a group of students who had built walking mechanisms that needed the linkages to be in sync. It was for a very specific project.

  • @harshad1435
    @harshad1435 27 วันที่ผ่านมา

    I want to do this for arudino nano how much battery required for this and which one where to apply power in arudino nano there power supply pin

    • @TheBoredRobotLLC
      @TheBoredRobotLLC 26 วันที่ผ่านมา

      The nano accepts 7-12 volts and you would connect the positive end of the batteries to Vin and the negative end to any GND pin.

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

    Amazing video and absolute gem of a channel! I have just started getting into robotics and had spent weeks struggling with how to solve this. Sod's law I found an old archived post that described something similar on the same day I found this video!! Just wish I had found this channel sooner haha :)

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

    hello. im performing a teste where i need that the sensorValue1 and 2 to be a float. because i need to be very precise. and so when i put float sensorValue1 and 2, in the python code, the append on the list does not accept float value to be assigned. Can you help?

    • @TheBoredRobotLLC
      @TheBoredRobotLLC 17 วันที่ผ่านมา

      It's really hard to say without seeing your code. Recently, I've just been sending my error messages into any of the AI chat bots to help give me insight into issues with my code that I write.

  • @user-vl6nu2tn5j
    @user-vl6nu2tn5j หลายเดือนก่อน

    Is it possible for the motor '1' to go around 10 times, and the motor '2' to go around 1 time?

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

      Yes that is possible. You would have to know the number of counts per revolution and then set that to be your desired position in your code.

  • @user-bk3zj2wd4d
    @user-bk3zj2wd4d หลายเดือนก่อน

    It would be nice if you could be more specific about the parts you used, such as the potentiometer

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

      The main parts are in the description. Any hobby level pot will do for this example. In the video, I used the ones from the Arduino starter kit.

  • @tb-vr1qv
    @tb-vr1qv หลายเดือนก่อน

    I watched an hour and a half of videos trying to understand pull up resistors, this is the best video i found and now i get it. Thanks :)

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

    Very helpful video thanks

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

    Does synchronizing also depend on the initial position of the two motors? Since from the beginning we are counting encoder counts, then synchronization only can happen if the motors started at the same position.

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

      For this simple example, it's assumed that the motors start at the same position. The motor positions are relative to the positions that the motors started at when the Arduino was powered up.

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

    Very good video. Where's the code?

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

      github.com/TheBoredRobot/TH-cam-Code

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

    This made much more sense of the Accel Stepper Library. Thank you

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

    Worked for the X-axis, thanks!

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

    ı am usinf fly sky FS-İ6x can ı used ıt wıth the same circiut and code

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

      Yes, this should work, if you have a receiver that uses the I-Bus protocol.

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

      @@TheBoredRobotLLC ı don’t know about that but ı will take a look at it thanks 🙏

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

    Much appreciated - Needed something like this for a lil project of mine :) Very helpful

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

    Hi, is this working with elrs transmitters ?

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

      I believe this protocol may be unique to this brand or transmitter/receiver. I haven't taken a look into other models though.

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

    can you include python code to copy

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

      github.com/TheBoredRobot/TH-cam-Code

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

    Omg that could have been so useful 5 years ago on my highschool project

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

      I'm glad you liked the video!

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

    is this also possible using an esp32

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

      Essentially this works with anything that can send serial data.

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

    Thanks for this helpful video. Makes sense, and explained at a good pace. QUESTION: Do you have a video to show simple contact closure switch/motor control integration? (i.e. simple code for stopping and starting individual motors with a simple switch) Thank you!

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

      Sorry, I haven't created a video like this.

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

    Please, I need your help. I applied this code to the Arduino Nano and Mega and adjusted the pound rate The problem persists: strange numbers appear

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

      It's hard to comment without knowing the complete project. If you get it working on an Uno first, perhaps you can narrow down you debugging process.

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

      @@TheBoredRobotLLC It worked exactly as you did, but strange letters and symbols appear

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

    Yes, very well done. Clear, simple, and thorough. Quite excellent.

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

    Hey man! Your explanation was clear and helpfull! I've been trying to use this same library to control 2 Nema 17 motors, on my line follower robot. But when add the code to read some IR sensors, it start's to stop the nema motors. After a quick search for similar problems on the internet, I've found that i can't have functions with that library that take to much time. I'm currently using an Arduino Uno, what if I move to a fast MCU, do you think it can solve this problem? I'm open to other alternatives!

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

      Using the non-blocking AccelStepper commands help with speed. Perhaps the faster version of the Arduino can help as well.

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

    I did this on an Arduino Nano and it didn't work

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

      Have you tried it on a different board?

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

      @@TheBoredRobotLLC Yes, I tried that on Mega and Nano

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

      @@TheBoredRobotLLC Strange numbers and marks appear on the two plates

  • @Alina-ph4vl
    @Alina-ph4vl 2 หลายเดือนก่อน

    import datetime current_time = datetime.datetime.now().strftime('%Y-%m-%d_%H-%M-%S') filename = 'arduino_data_' + current_time + '.csv' type(filename) print(filename) import serial # import the serial library to establish a connection with arduino import matplotlib.pyplot as plt # imort this library for real-time plotting and named as plt for convienient from matplotlib.animation import FuncAnimation import csv import warnings warnings.filterwarnings("ignore", category=UserWarning) # Define some cotnents to configure serial connection SERIEAL_PORT = 'COM3' # Choose the port connecting to Arduino BAUD_RATE = 115200 # set the communication speed # Using the cotnents to initialize serial connection ser = serial.Serial(SERIEAL_PORT, BAUD_RATE) # now we can you the object 'ser' to connect serial data. we can get byte data from serial port # Initialize empty lists to store data x_vals = [] # to hold the timestamps sensorValue1_data = [] # as y1 sensorValue2_data = [] # as y2 # Create a function to read and process data from Arduino def read_and_process_data(): line = ser.readline().decode('utf-8').strip() # reads a line of data from the serial port. It then decodes the data into a UTF-8 encoded string and removes any leading or trailing whitespace characters before returning the cleaned string data. sensorValues = line.split(', ') # the string is split whenever a comma followed by a space is encountered. The resulting substrings are stored as elements in the sensorValues list. # seperate and convert the timestamp, sensorValue1_data, sensorValue2_data from sensorValues x_vals.append(float(sensorValues[0])) sensorValue1_data.append(int(sensorValues[1])) sensorValue2_data.append(int(sensorValues[2])) # Print the recived values (for the sake of debugging) print(f'Time:{sensorValues[0]}, Sensor 1:{sensorValues[1]}, Sensor 2:{sensorValues[2]}') # An f-string is a way to format strings in Python that allows for variable interpolation within a string. # Create a function to update the plot def update_plot(frame): read_and_process_data() plt.cla() # clear the existing plot plt.plot(x_vals, sensorValue1_data, label='Sensor 1') plt.plot(x_vals, sensorValue2_data, label='Sensor 2') plt.xlabel('Time') plt.ylabel('Sensor Values') plt.legend() # Creat a function to save data to a CSV file whem the plot window is closed def on_close(event): with open(filename,'w',newline='') as csvfile: # open a csv file in a eitable way. If the file don't exit, it will automatly crear a new one. newline='' to prevent write empty line. writer = csv.writer(csvfile) # create a CSV writer to write data into this CSV file writer.writerow(['Time','Sensor1','Sensor2']) # Writ Title row into CSV for x, s1, s2 in zip(x_vals, sensorValue1_data,sensorValue2_data): # looped the data in parallel for timestamp, sensor1 and sensor2. writer.writerow([x,s1,s2]) # Write each row to the CSV file # Register the callback funtion for when the plot window is closed fig, ax = plt.subplots() # Creates a new figure window and its corresponding axes, returning the fig figure object and ax axes object for further plotting operations. fig.canvas.mpl_connect('close_event', on_close) #Listens for the close event of the figure window. When the figure window is closed, it triggers the on_close function to handle the close event. ani = FuncAnimation(fig, update_plot,interval=10) #creates an animation object ani using the FuncAnimation class from Matplotlib. It associates this animation with the fig figure object and specifies the update_plot function to be called at each frame update with an interval of 10 milliseconds. plt.show() # displays the plot window containing the animated plot generated by the FuncAnimation, allowing the animation to be shown to the user.

  • @Alina-ph4vl
    @Alina-ph4vl 2 หลายเดือนก่อน

    void setup() { Serial.begin(115200); //setting up the connection between arduino and computer } void loop() { float time = micros() /1e6; // calculate the current time using micros and convert it to seconds for time stamping int sensorValure1 = analogRead(A0); //read the analog values from the two light sensors int sensorValure2 = analogRead(A1); delay(100); // add a short delay to ensure a reasonable sampling rate Serial.print(time); // send the data to the computer via the seral port. Print the "timestamp,sensorValure1,sensorValure2" Serial.print(", "); Serial.print(sensorValure1); Serial.print(", "); Serial.println(sensorValure2); }

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

      This is a simple sensor read code. The video should show how to send it over to python.

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

    where is the code?

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

      github.com/TheBoredRobot/TH-cam-Code

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

    How is that simultaneous reading? if it was simultaneous wouldnt that mean you can do both accelerate and turn on the joystick and it should chnage both graphs at the same time on the plotter. i need this because i read from a transmitter but one rc signal is for my left wheels and the other rc signal is for the right wheels. i can do both separately but not a the same time so i cant make my car go forward

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

      You're right it is not true simultaneous reading, since Arduino isn't capable of that. However, this is a demonstration on how to avoid using pulseIn(), which blocks all other calculations while it's measuring the pulse lengths. For most applications, using timers to read multiple signals would make it "appear" as if the signals are being read at the same time. I do have an updated approach to this that seems to work better. th-cam.com/video/MsUL-RY8ZrY/w-d-xo.htmlsi=HRwcIhCFfLf5MpO9

    • @rickperalta1921
      @rickperalta1921 3 วันที่ผ่านมา

      Concurrent with interference. If both interrupts fire at the same time one will be belayed by the service time. Good catch!

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

    appreciate it bro