I have an idea for an invention. I've taken a class on electrical engineering and have done some basic programming. But I'm VERY new to arduino!
I have a goal in mind, and a lot of the mechanics figured out. I just want to arduino-ize! I am building a semi-autonomous solar UGV. Its going to be a tread-driven, nasa-looking tank thing about two feet long. And solar powered! The cool part is that its photo-voric needs are automated. The solar panels will adjust automatically to the brightest light source. Easy wiring stuff there.
My problem is that this thing is semi-autonomous. I want to be able to use TouchOSC to control it by XBee, and when I'm idle on the controller, it goes on its autonomous way. To do this, and several other functions, I need to combine a lot of arduino code I found here and there. How do I even go about this? I know essentially nothing about the code.
Is there anyway I could coax one of these brilliant programmers to do an arduino code mash-up for me? I'd be more than happy to post the code I need (or hear suggestions). I want it to be IR guided, so it avoids obstacles over 10 inches tall. I also want it to be able to sync up to my android phone's TouchOSC. Something I can't even find code for. As far as batteries and voltage and charging and wiring, I can do all that. Its the programming that gets me!
My advice:
Start with paper and pencil and make drawings of how you think it should work. Make a hardware decomposition of the modules you might need, define the flow of information you need, define some protocols/handshakes. And if you think you have thought all over, start building it part for part, step by step and if there are concrete problems you can't figure out or concrete error messages you do not understand the forum is the place to be
There are many subprojects you can start with,
- getting a riding tank, no wireless just with USB cable, move (forward)FW FFW BW FBW LEFT RIGHT STOP
- create a light source tracker - how do you know for sure, you are tracking the brightest spot?
robtillaart:
My advice:
Start with paper and pencil and make drawings of how you think it should work. Make a hardware decomposition of the modules you might need, define the flow of information you need, define some protocols/handshakes. And if you think you have thought all over, start building it part for part, step by step and if there are concrete problems you can't figure out or concrete error messages you do not understand the forum is the place to be
Great universal advice here! Read it, understand it, use it!
Are you familiar with flow charts or Petri nets? These are great tools to get a visual of what you want the system to do, what order and what events trigger what. At this point, it might be worth putting your project aside for some time. Read up on these matters, see if you understand how to use them to modelize the system you want and then carry on with your work.
I know, you're excited in getting your tank going, but this is a tool that you can use in plenty of situations in your future. 
Great universal advice here! Read it, understand it, use it!
yep, and you will be amazed how many drawings you can make in 1 hour, and how much better you understand your project - and its problems! 
Simple some squares, circles and arrows, a few notes, in short a elementary architecture. It doesn't have to be a 100% complete HQ documentation, although it can be the basis for that.
It is also good to make first a Q&D requirements list. Just make 3 small lists (take max 5 minutes per list)
- what must the system do
- what not
- constraints e.g. from the environment
From these prelim architecture and requirements you can define the most important lists:
- what do I need to learn to accomplish this project.
Rob,
I've made a few diagrams, and like I said, the physics is already worked out. I've done the trig and so forth to make its weight and mobility be able to handle a 40 degree upward and downward climb without falling. As for tracking the brightest spot, that is simple non-arduino wiring with photoresistors into a servo.
I'll honestly say, I'm blown away by the responses I got. I posted near midnight EST the first time, and by 8 a.m. I had three great opinions. This community is proving to be very supportive and insightful. Perfect resource for global domination. When I rule the universe, I'll be sure to remember this.
I shall begin programming and construction on my evil invention. I'll post here again if I need any more help! In the meantime, if anyone has any ideas of simple, but neat things a two foot long tank could do, let me know. Shoot an airsoft gun? Pepper spray? Wifi camera?
In the meantime, if anyone has any ideas of simple, but neat things a two foot long tank could do, let me know. Shoot an airsoft gun? Pepper spray? Wifi camera?
NOt all simple but to open up the mind:
- add a movement detector PIR, a RealTime Clock and a light detector and a robotic arm so it goes through your house and switch of the lights to reduce electricity usage.
- Detect flies and wasps and other intruders (moving intruder alarm)
- An "open the door" tank
- Defense for the beer in your fridge
- Key finder
- a "bring me the remote" tank.
- a "wake me with a gunfire" tank - a moving alarmbell, that will wake everyone in house at their specific time, it moves from room to room until everyone is awake
- ...
Levinus:
I'll honestly say, I'm blown away by the responses I got. I posted near midnight EST the first time, and by 8 a.m. I had three great opinions. This community is proving to be very supportive and insightful. Perfect resource for global domination. When I rule the universe, I'll be sure to remember this.
Ahhh, the beauty of having a round planet and time zones. Wait until midnight EST and more answers will come.
The truth is that right now, the most important thing you need to learn is how to structure what you need to learn, do and in what order. If you master this organizing (some call it management), everything else will come far easily.
Levinus:
I shall begin programming and construction on my evil invention.
Does this mean you won't work for Google? LOLOLOL
For a tank, I'd do a tracking function. You get an ultrasound sensor and you try to have your tank following people around. The other thing that just popped into my mind is for you to make a tank that implements the functions in Robocode. But that's probably asking too much. 
Alright! I acquired my arduino and started playing with the programming! I've done some of the basics with the equipment available. Blinking an LED, using it to power a small 3v motor, etc.
Now for my next question!
I have a Double Eagle M98 airsoft weapon I'm going to use for my project. It is powered by a 7.5 v AA NiCd rechargeable pack. I dismantled the weapon and exposed two terminal wires which were originally hooked up to the trigger. I can touch the leads and the weapon fires.
I think I heard that the arduino can handle anything under 12v safely. But what code would I use to fire it? The way the wiring is now, the two terminal wires were originally soldered to a basic switch circuit. When a condition was met, the arduino would send the voltage into the weapon to fire it. I DO NOT want to use a physical switch to do this. Its cumbersome and seems impractical. I know I could have used a servo to pull the trigger, but I simply don't want that. I want it to be fired digitally.
This question is going to get even MORE fun. I mentioned a "condition" to be met. Here is my condition. I have a PIR motion sensor 3.3-5 volts. I have a scope. I'll put the sensor in the scope and viola! I have an infrared turret. That code shouldn't be too hard to incorporate. There is tons of PIR code around this site I can use for that. I'll post some code and get everyone's feedback on that later.
So I guess my whole thing boils down to a few problems. My gun is powered by roughly 7.5 volts. I really need the "switching" code and circuitry. How to make the arduino act as a switch. A switch with 7.5 volt output.
I think I heard that the arduino can handle anything under 12v safely.
Where did you think you heard that?
The supply can be of that order, but you can't connect anything to an I/O pin with a voltage higher than the supply, or lower than the ground (give or take half a volt).
Try a relay, or a logic-level MOSFET.