Shop OBEX P1 Docs P2 Docs Learn Events
rc arlo — Parallax Forums

rc arlo

do i have to run a script to use my radio controller and can i use blocky prop
«134

Comments

  • What controller do you have?
  • activity board wx and its an arlo robot
  • flysky radio controller and the receiver is fs-ia6b
  • I would look into the receiver’s protocol, then try to get ahold of propeller code for that receiver. Than you could add that into the code driving your Arlo.
  • Yes, quite easy. If it's a pulse-width output from the receiver it should work like this in BlocklyProp pseudocode:

    Receive CH1 from radio, store in variable (pulsin command)
    Receive CH2 from radio, store in variable (pulsin command)
    do a calculation to turn it into speed for your speed controller
    Provide left and right motors with a speed

    Not much too it. There's a guy (John Topf) doing the exact same thing on the Blockly for Microcontroller Facebook group https://www.facebook.com/groups/blockly/?ref=bookmarks

    Ken Gracey
  • Thanks
  • what pins on activity board would i put the receiver on
  • reinaldo wrote: »
    what pins on activity board would i put the receiver on

    The easiest way is to use the 3-pin headers. These are P12-P17. They will use the three pin servo type cable that go to the receiver. Depending on how your receiver is powered, you might have to remove the power jumpers on the headers you use.
  • just use the signal wire from the header right?and plug it into those specific pins?
  • is there anyone who knows what it would look like specifically in blocklyprop can someone possibly take a screen shot of the block code
  • reinaldo wrote: »
    just use the signal wire from the header right?and plug it into those specific pins?

    You would also use the ground wire from at least one set of pins to go to the receiver. What receiver do you have?
  • fs-ia6b
  • reinaldoreinaldo Posts: 71
    edited 2020-01-23 03:49
    ^
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2020-01-22 22:27
    2020-01-22_13-57-07.jpg

    Sure, here's a starting point. This is a project with an R/C receiver where two pulses are received and stored. Next, they're mixed into a value and output to ESCs (PWM input speed controllers attached to big motors). You'd replace your motor driving code with DHB-10 code (or whatever device you are using) and modify the numbers to be a range of values for whatever you're controlling. Build this one step at a time, testing carefully as you go.

    The actual project it's running is right here:



    It's a wonderfully fun project and I'm not getting it accomplished like I thought I would. I think work got in the way.

    Ken Gracey
    904 x 434 - 135K
  • wow ok i will try this with arlo
  • reinaldoreinaldo Posts: 71
    edited 2020-01-22 22:46
    i think im getting there i found that specific blocky page
  • reinaldoreinaldo Posts: 71
    edited 2020-01-22 22:56
    lol getting their little by little though
  • thanks guys i got it to work!!!!!!!!!!!!!!!!!!!so excited
  • reinaldo wrote: »
    thanks guys i got it to work!!!!!!!!!!!!!!!!!!!so excited

    I'm not the least bit surprised. You knew where you wanted to go, understood the steps, and are starting to put it together.

    Your next steps will be about doing what you are doing, better and more efficiently. You're going to poke around in BlocklyProp looking for other commands (probably the MAP command), take a look at the reference, and improve upon what's been made.

    Use https://solo.parallax.com for Blockly. Download the blocks file, then open them in Solo. You can save your work locally.

    Ken Gracey
  • Thanks so much I’m showing you guys soon a link to view my video
  • how would i add my pings to work lol i can't get it to work with the script properly
  • reinaldoreinaldo Posts: 71
    edited 2020-01-23 03:48
    im trying to get pings to stop arlo while rc forward
  • You'd need to share your code. Right side, hamburger-looking menu and choose "edit project details". Choose public and put a link here and we can take a look.

    You want the Ping)) Ultrasonic Sensors to be disabled during forward movement on the R/C sticks? There are a number of ways to go about this.

    Ken Gracey
  • reinaldoreinaldo Posts: 71
    edited 2020-01-23 15:32
    gathering my blockly page took me a year to write this code i took out some code so arlo does not move forward on its own
  • reinaldoreinaldo Posts: 71
    edited 2020-01-23 13:32
    this is the code below
  • http://blockly.parallax.com/blockly/projectlink?id=127445&key=8af42e25-f498-4e34-8995-02c5ca98258e



    this is my arlo code i implemented ken gracey's boat project code into my arlo code. Thanks Ken!!
  • reinaldoreinaldo Posts: 71
    edited 2020-01-23 15:36
    my R2
  • Wow, there's a lot going on with this big cArlo!

    Got a tip on the coding. When you have repetitive functions (blocks of the same color, over and over) there's usually a way to calculate all the values and use a single set of blocks for calculating drive speed. Using functions can further simplify things.

    For example, you could create a loop that steps through all of the I/O pins containing a Ping))) Ultrasonic Sensor and store their values in an array. One example of arrays is here https://learn.parallax.com/tutorials/robot/activitybot/qti-line-following-activitybot-blocklyprop/line-following-using-arrays. Next, create a function to evaluate the numbers and identify the sensor with the closest object detected.

    Many programmers on this forum can reduce things further and further, but you'll need to think about these steps so that you understand them.

    Nice work on cArlo. Get those robot arm guns working! Maybe silly string or fire shooters?

    Ken Gracey
  • that specifically i need help to write thats very confusing in blockly
Sign In or Register to comment.