PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default I'll buy two USB 32-Bit Whacker - PIC32MX460

    What else do I need? I am confused but very impressed by the young man in the video. I'll get the ZIGflea later.

    Ken

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    What else do I need? I am confused but very impressed by the young man in the video. I'll get the ZIGflea later.
    Yes, me too!

    That should be all you need. However, this one does not come with StickOS installed. But you can use your PicKit2 to install StickOS firmware into it. And, by doing that, you will get the latest 1.80 version. You will need to download a windows driver from this page CPUStick.inf : http://www.cpustick.com/downloads.htm

    But with that, and hyper terminal, you can start writing some code. Oh, and you won't get a manual either, so you will have to print one.

    Walter
    http://www.scalerobotics.com

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Hi Ken. I do not see why you should leave PBP and start another similar language and your project all over again.

    If you do need RF communication between nodes maybe a Zigbee modules or RF transceivers can give you a good solution without almost a line of code.

    Look at Digi modules (Zigbee or not, does not matter) for out of he box communication. Other brands also exist, many I can say.

    Ioannis

  4. #4
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    I do not see why you should leave PBP and start another similar language and your project all over again.
    I wouldn't normally suggest it, as PBP can do just about anything. But here is why I think it might be a good idea in this case.

    Configs are confusing for adults, I would hate to frustrate middle school students. This would keep them from having to worry about those.

    PBP kind of expects you to read and understand the data sheet. StickOS would just require them to get read the device pinout. They could just start with the data sheets for their sensors, and not be overwhelmed by a 200 to 500 page data sheet.

    They would not have to worry about setting ADCONx, trisx, cmconx etc...

    With StickOS, they can just say:
    Code:
    10 dim pot as pin an5 for analog input 
    20 print "potentiometer= ",pot
    Now here is some PBP code that does a similar function:

    Code:
    Define ADC_BITS     10  ' Set number of bits in result
    Define ADC_CLOCK     3  ' Set clock source (3=rc)
    Define ADC_SAMPLEUS 50  ' Set sampling time in uS
    
    adval Var Word          ' Create adval to store result
    
       TRISA = %11111111    ' Set PORTA to all input
       ADCON1 = %10000010   ' Set PORTA analog and right justify result
    
    mainloop:
       ADCIN 0, adval       ' Read channel 0 to adval
       serout2 PORTC.6,396,["Value: ",DEC adval,13,10] ' Display value
       Pause 100            ' Wait .1 second
       Goto mainloop        ' Do it forever
    
    End
    And pretty high up there in my opinion is the cost. I know the school my son goes to has trouble buying pencils and paper. They would pretty much need everything donated to be able to do it. I think Ken said the cars were $80, this CpuStick is about $40. The PBP software is $250. So the cost per unit is $120 with StickOS vs $370 for PBP. That's over three times the cost. So, for the same cost of having 30 students share 10 PBP units (one kid does the work, while the other two watch), they could have one for each kid in the class.
    http://www.scalerobotics.com

  5. #5
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default The cost is important

    There is already an educational oriented company, www.Ten80Education.com, which uses model level 1/10 scale radio control cars. They focus on automobile related engineering, toe-in, tire friction, gearing, power usage, damping, suspension. The car they use, the HPI Sprint, costs about $200 retail. Coincidentally I chose this same car for my project. I hope to integrate my PIC car into their curriculum.

    It is the add on cost for my project that must be controlled. The sonars cost $28 each. It is really too bad that the PBP cost is just for a one PC license.

    Big question?? What kind of games could our robocars play if they could talk to each other over zigFLEA?

    Ken

  6. #6
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default One more thing

    I use the model level car because its steering and wheel drive is based on proportional PWM signaling. This I need for the wall following (at speed) trick.

    The much cheaper ~ $50 ~ 1/10 scale toy level car has bang-bang steering that motor control. If that is all we need for the learning game, then the total cost comes way down. These cars are FAST.

    Ken

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    These cars are FAST.
    Yeah, but with very little control on the steering. Like you described it as bang bang (to the walls)...

    The fuse settings, or settings in general may be solved by an include file made by Ken and students all have to do is just ... include it.

    So they are left with the main body of the software. Which comparing to stickOS is a little more difficult. But you have interrupts and much faster execution time...

    About the cost, well, OK. 250 is much money, but good things cost...

    Ioannis

  8. #8
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Yes, ignore the warning. That is a default if Windows doesn't know what the file is.
    http://www.scalerobotics.com

  9. #9
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Yay!

    Now you can start to write some simple programs. They show some examples in the manual. You will need to look through the Quick Reference guide here: http://www.cpustick.com/downloads/quickref.v1.80.pdf for all the commands.

    Some of the interesting ones are:
    help
    help pins

    And you can set the heartbeat LED (if it is not blinking already) by:
    pins heartbeat RA1
    (You will have to look on the board to see which port goes to the LED you want to set as heartbeat, RA1 is PORTA.1 and works on my Explorer 16 board).

    This prints out an analog result to the terminal:
    Code:
    10 dim pot as pin an5 for analog input 
    20 print "potentiometer= ",pot
    You would probably be interested in the Servo example on page 30:
    Code:
    > new
    > servo
    45
    > 10 dim servo as pin dtin1 for servo output
    > 20 for servo = 50 to 250 step 10
    > 30 sleep 50 ms
    > 40 next
    > run
    Note that you will have to change the servo out pin to one your hardware has. To see the available ones, use the "help pins" command. It will show you at the bottom which pins are available for the servo command. In my case, I changed dtin1 to rd1.
    http://www.scalerobotics.com

  10. #10
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Is there a way to capture this forum thread?

    scalerobotics,

    My focus is changing from teaching STEM to middle school kids to teaching the teachers about teaching STEM to public school kids.

    Documenting our conversations over the last months might give me some insight on the process. Is there a way to capture this thread as a .doc or a .pdf file?

    Ken

  11. #11
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    Documenting our conversations over the last months might give me some insight on the process. Is there a way to capture this thread as a .doc or a .pdf file?
    Once a routine is made, a lot of it can be forgotten (thankfully). I don't see any good ways to do this, but here is one way. It will only get you 40 posts at a time though. I have looked for a way to change this setting, and it looks like it is not settable, at least by me.

    If you goto thread tools, and click on show printable version, you get something of a better format. Then you can go to file, and save as, and save it as html. While you are on this printable version, you can then select the next page of posts, and select save as, then call it page2 or something. This isn't ideal, but it's the best I can come up with.
    http://www.scalerobotics.com

  12. #12
    Join Date
    Feb 2011
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: PBP projects for R/C models

    Hi,

    Quote Originally Posted by scalerobotics View Post
    However, this one does not come with StickOS installed. But you can use your PicKit2 to install StickOS firmware into it. And, by doing that, you will get the latest 1.80 version. You will need to download a windows driver from this page CPUStick.inf : http://www.cpustick.com/downloads.htm

    But with that, and hyper terminal, you can start writing some code. Oh, and you won't get a manual either, so you will have to print one.

    Walter
    I just stumbled onto this thread...

    I'd like to also point out you don't actually need a PicKit2 to program the UBW32, since it comes with the Microchip HID bootloader installed -- you can just download StickOS to the board using the procedure here: http://www.schmalzhaus.com/UBW32/doc...mentation.html

    Be sure to use the proper version of StickOS for the UBW32: http://www.cpustick.com/downloads/St...v1.80c.elf.hex

    I'm definitely game to help folks get this into a classroom setting -- let me know if I can help. (Just drop me an e-mail; unfortunately I'll be out of town for a week starting tomorrow morning.)

    One small comment on an earlier post -- if you are using pins rd0-rd4 on the PIC32 and configuring them for PWM/servo mode, then they are controlled in hardware without CPU assistance -- so the BASIC program can do any other things while they are generating pulses, without affecting the pulses.

    -- Rich
    [email protected]

  13. #13
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default OFF topic - where do I go??

    For reasons to messy to explain I am trying to get a robocar to run on a blank 32MX460F512L. I was hoping to use Microchip's C compiler pic32-gcc.exe. I am having a very difficult time getting started. Do you know of a beginners example that will take me though step by step?

  14. #14
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: PBP projects for R/C models

    Oops, I guess it is not free anymore. Or at least, only free for 10 days. Looks like it is 9.95 for one month, or 59.95 for a year. They have added a few features since I last looked. Here is a shot from their logic probe demo:



    And I guess there are 9 chips it supports from Microchip:

    Attached Images Attached Images   
    Last edited by ScaleRobotics; - 17th April 2011 at 16:34. Reason: embed pictures help?

  15. #15
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Smile We may get noticed by the Big Boys

    Folks from MIT's Lincoln Laboratory have taken an interest in my robocars for kids. LL has an Education Outreach program which schedules workshops each summer. If you like go to
    http://roboworksmay22.eventbrite.com/

    Note the sentence:
    Follow-on workshops are planned for the summer where kids will learn to program general purpose processors to control sensors for an autonomous robotic NASCAR.
    Let me THANK YOU ALL for all for two year's of support. LL seems Arduino oriented. I don't know why, but they have the resources and the prestige to take this to the next step.

    I'll keep you informed if I can.

    Ken

  16. #16
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: PBP projects for R/C models

    Hi Ken,

    Sounds like things are finally rolling for you.

    You may want to look at this section

    http://www.picbasic.co.uk/forum/cont...r=346-amicus18

    It is a hardware replacement for the ardrino that uses PICs and PBP.
    Dave
    Always wear safety glasses while programming.

  17. #17
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: PBP projects for R/C models

    VBB is tri-lingual. It can do Arduino, Amicus, and 7 flavors of Microchip. I have not looked at it for a few months, but for free, it looked pretty cool. But, the closest thing to an 887 that it has is an 877.
    Walter

  18. #18
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Not a problem Ken, this is definitely the hardest part. And the manual doesn't really pull it all together for me either. Once you have a connection, you almost don't have to worry about those parts again though.

    Here is the hex file you need. I have it in a zip file attached. It also has the driver you need. You must install the driver into your computer. Right click the driver, and select install. Then hopefully when you plug the USB cord from the UBW to the computer, you hopefully will see something happen.

    We will get it going, or die trying. Hopefully the former.
    Attached Files Attached Files
    Last edited by ScaleRobotics; - 14th October 2010 at 05:08.
    http://www.scalerobotics.com

  19. #19
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Progress is not progressing

    Thank you scalerobotics!

    The .hex file you sent compares exactly to the one I used. At least each displayed using 'notepad' are identical. The .inf file you sent enticed WINDOWS XP PRO into displaying a GUI warning me against installing it as it had not passed the WINDOWS LOGO test! Do you think I should ignore the warning?

    Ken

  20. #20
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Mecanique products for 32 bit PIC??

    scalerobotics:

    I was hoping I would find in my MicroCode Studio Target Processor pull down menu a reference to the PIC32 that we are using. Nope! Do they sell an appropriate BASIC compiler?

    Ken

  21. #21
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    scalerobotics:

    I was hoping I would find in my MicroCode Studio Target Processor pull down menu a reference to the PIC32 that we are using. Nope! Do they sell an appropriate BASIC compiler?

    Ken
    No, they do not. I think you are limited to C, assembly, or StickOS with the 32 bit devices. I thought you were going to try StickOS though? If so, you really don't need to learn too much about the chip. StickOS does most of background stuff for you.
    http://www.scalerobotics.com

  22. #22
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    AFAIK, no one makes a BASIC compiler for the PIC32 (or any other 32-bit MCU for that matter). Your best bet is to go with C which is pretty the de-facto language (not a lot more difficult to learn/use but far more powerful/flexible/reliable).

  23. #23
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rmteo View Post
    Your best bet is to go with C which is pretty the de-facto language (not a lot more difficult to learn/use but far more powerful/flexible/reliable).
    In my opinion, C would be a lot harder for the middle school students to learn. C isn't very readable if you ask me.

    For one you have to teach them
    {why all the
    }
    {darn brackets
    }
    {are all over the place}

    Then why the main code is void, but works.

    I think StickOS is a bit easier for them for their first intro to micro controllers. But that may be because I don't understand why the brackets are all over the place.
    http://www.scalerobotics.com

  24. #24
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default I'll go with StickOS for now, but....

    The .hex file does not load. It says that MAXIMUM must be greater than or equal to zero. In fact it is -7xx or so. Here's the error printout.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: Value of '-749' is not valid for 'Maximum'. 'Maximum' must be greater than or equal to 0.
    Parameter name: Maximum
    at System.Windows.Forms.ProgressBar.set_Maximum(Int32 value)
    at PICkit2V2.FormPICkit2.ResetStatusBar(Int32 maxValue)
    at PICkit2V2.PIC32MXFunctions.P32Write(Boolean verifyWrite, Boolean codeProtect)
    at PICkit2V2.FormPICkit2.deviceWrite()
    at PICkit2V2.FormPICkit2.writeDevice(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP Extensions, What are they?
    By PJALM in forum PBP Extensions
    Replies: 9
    Last Post: - 28th September 2021, 11:26
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. Making PBP code more modular
    By forgie in forum General
    Replies: 30
    Last Post: - 25th October 2005, 16:24

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts