Ok so for my Junior year Research Paper I decided to do it on Asimovs Three Laws of Robotics and how it will apply to society, we need an in class example and I figured I would use my VEX kit to show off the laws… but Im not entirely sure how to do that with what Ive got, which is
The original Starter Kit
Chain and Sprockets
and Programming Kit
… Yea not much, I really wanted to pick up the Tank treads and Ultrasonic sensor when radioshack was clearing out but they were already sold out. oh and the programming kit is V1 because Im too cheap to upgrade to V2 (which I think is a great upgrade but I dont think I should have to pay for it since I already bought the whole dang thing for $100) Anyways, if you guys dont know the laws they are:
1 A robot may not harm a human or through inaction allow a human to come to harm
2 A robot must obey an order given by a human except where such an order does not conflict with the first law
3 A robot must protect itself whereas such protection does not conflict with the first or second laws
I figure I have Square bot built right now with some bumper switches and a light switch, so far Ive programed out that if it hits something to back up and wait for me to do something on the controller which would be modelling both Law 1 and 3 at the same time and me at the controls models Law 2…
Ive got some other things im working on in the program and Im open to any and all suggestions and comments (as long as theyre constructive). I suppose this isnt truely imparitive to my grade but It would leave a nice impression. All help is appreciated.
well, i dont think i can have the robot AVOID a human if all i have are trip limit and light sensors… I might be able to use th light sensor but I dont think it will work in time, and if I used it, it would also make it steer away from shadows… which is not quite what I want it to do because Im going to be demonstrating in a classroom and its liable to run under a desk… Im still working with it and I think I might have it kinda figured out…
oi, Ive run into some coding problems If any of you guys could help here: https://vexforum.com/t/coding-problems/14340/1 that would be awsome. I probably shouldve just tacked it onto the end of this thread but I figured it belonged in the Technical discussion, anyways The project is due soon so If anyone could help it would be GREATLY appreciated! Thanks guys!
I now have the Ultrasonic Sensor and it works fine… but I just cant get D4N331 to work right… I just cant figure out the coding, mainly because figuring out which loop to use confuses the crud out of me… IF, IF-ELSE, WHILE, FOR… it all seems self explanitory but I cant get it organized in a such a way as to get it to work…
Again what I need EXACTLY:
I need to have manual control to start with, as I drive I need my robot to stop and turn when it is roughly an inch away from something (about 10 or 12 on the ultrasonic reading is right) It also needs to stop if the front limit switch or front bumper switch is tripped (im going to upload images in a second and edit this post with a link)
I need to press a button or SOMETHING and have the robot drive on its own, while still stopping an inch from something or hitting something.
This seems like SUCH a simple problem but I cant figure it out… Im sorry for bugging you guys so much with this but please help me out!
I also seem to have a problem getting him to turn, he’ll go about halfway and just kinda run outta steam, Hes just a modified Squarebot and he was working fine a few days ago… I dont know if my motors are wearing out or if I just dorked something up but if anyone has any solutions to that problem also it would be greatly appreciated.
okay… well thanks to those who DID help me anyways, Ive got the coding propblem pretty much figured out but as I said earlier, my bot is having problems turning (tank style controls) I think its cuz the gears are dragging on the carpet but i dont know what that would stop him only mid-turn and not from the get go… which leads me to believe theres still something wrong…
if anyones got any ideas on this let me know, where im doing the demonstration dossnt have quite as soft a carpet but its still carpeted so i need to know what it is thats causing problems and if i need to buy tank treads or something.
no clicking sounds… the more i look at it the more i think its just dragging on the carpet… i think im going to modify one of my servos and turn it into a four motor design, that should be enough power to move the darn thing… if i have the four motors that would take out the big gear in the middle and thats whats dragging, so hopefully this’ll work.
EasyC is driving me INSANE! okay so I rebuilt my bot and now it has 4 individual motors each driving a small wheel, they all work fine with the default coding downloaded to the microcontroller but when I try using the Tank - 4 Motor function block my robot decides its just going to sit there… ive tried everything I know to fix it, setting the RX to 0 and actually tethering the controller to the microcontroller, messing with different slots for the 3 pin connectors… nothing I do works, The ONLY thing I can figure that might be messing something up is that I modified one of my Servo’s to make it a Motor… though I really dont think that would change anything…
If you have y cables, try using a 2 motor tank module and then use y cables on 2 of the motors. I would need to see your code to give more help. If you could take a few pictures and upload them I’m sure someone would help. Take a look at your code and look if there is anything obviously wrong. Are there 2 green lights on your robot when you are running your code?
You may wanna try setting it to RX 1 or 2, and then making sure ur tether is plugged into the right port. But i dun think that would affect it.
Also, if you are using a competition template, beware of the twenty second autonomous mode. I’ve freaked out a lot when i program something and i’m sitting there and it won’t move. Either wait for autonomous to end or put a jumper into one of the interupts. ( i think it’s the last one.)
Im not in competition mode, Im trying to design this bot for a Demonstration of the 3 laws, anyways when I use the jumper it works but That wont work if I download a User created Code into the microcontroller will it?
Okay so I figured out how to run the Tank Code by itself, but when I insert it into the rest of the program (i.e. a IF Else statement) it magically stops working, and Its probably because Its not in a while loop anymore…
BUT it was working fine with my previous 2 motor tank code and I didnt have it in a while loop… and now when I go back and try running the older code it wont work, I have NO IDEA whats going on now… I consulted the help files and found nothing and I cant figure anything that would cause it to spontaneously just stop working…
im about ready to kick my robot if it wasnt for the fact that I know it would hurt me more…
I finally I have the code down, I think the modified servo was messing me up so I removed it and the other front motor, Instead of using one large gear or sprocket in the center to turn two smaller gear/sprockets, I decided to leave the Back motors in place and just use the two smaller sprockets and a chain.
Now I can run my previously working code and he can roam around all by himself OR under my control!
Thank you everyone for helping me! Im sure with this addition to my presentation Im going to get an A+!
Major thanks to MarkO, the XY Mode switch is engineous!