Show Posts
|
|
Pages: [1] 2 3 ... 10
|
|
3
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Need help programming
|
on: June 26, 2009, 09:21:27 pm
|
You can unzip the 7z with 7zip http://www.7-zip.org/ If you are in windows, right click the file and use the 7z menu to extract it. .c files are just text (as are .pde files). you can open them with notepad. You will have to copy the code in the c file and add it to a new Arduino project. Some of it at the top (anything above the main routine, and the variables etc in the main routine) need to be above your loop. The parts in the initialization section need to go into your setup routine, and the parts that are in the while loop would go in your loop. That's my best guess after looking at the file for a couple of seconds. You are going to have to move the libraries around to make things work, and even then you will only have some base code. You're still going to have to modify it to match the pins used by the motor shield (if that's the direction you take), etc.
|
|
|
|
|
4
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Need help programming
|
on: June 26, 2009, 02:26:16 pm
|
The minisumo code is a .7z file, which is a type of zip. You can download 7zip to unzip the file. There are a number of .pde files within the zip. i can just download the code to a atmega168 with no changes or change the code to run in Arduino IDE?? Not sure on the first one, since I haven't looked at the datasheet to see if all of the pins on the 168 match the 8. If you wanted to use the code as is, you'd be better off buying a $4 ATMega8 chip (instead of a $30 Arduino) and following the example on that site. Definitely yes to the second one; open the .c file with your favorite text editor, and you'll see that the code inside is pretty similar to what you expect in Arduino. You'll have to get all of the libraries in place, and rearrange the code a bit. It will take some work and experimentation, but it can be done and you'll better understand the entire process in the end.
|
|
|
|
|
7
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino 0016 IDE Slow
|
on: June 20, 2009, 10:01:07 pm
|
|
Not sure about the speed issue, but the Basic GUI issue is due to the old version of Java that is bundled into the Arduino package. The easy fix is to make sure that you have the latest Java installed, and then delete, or rename, the Java folder in the Arduino folder.
|
|
|
|
|
12
|
Forum 2005-2010 (read only) / Troubleshooting / Re: I can't get my head around this one -Robot control
|
on: May 29, 2009, 09:47:29 am
|
|
I would think about it like this:
The 3 doesn't represent a turn, it represents movement in a different direction. The turns are represented by the change from one value to another in the array. If the user enters 5 1's and 5 3's then they want to move 5 spaces, turn, and move 5 more spaces. If you are interpreting the first 3 as a turn you will only move 4 spaces after the turn unless you work that into your logic.
I would use logic like such:
look at the element of the array that you are on, and compare it to the last element, if they are different then figure out which direction to turn (1 to 3, 3 to 1, etc), do the turn, and then process the element as forward movement.
You could also rework the drawing method to only store a 3 when there is a turn, and store 1's for the X movements, but I think that it would be more complex that way.
HTH, Rob
|
|
|
|
|
13
|
Forum 2005-2010 (read only) / Bugs & Suggestions / Re: how do i format my sourcecode with tab in arduino
|
on: August 07, 2009, 07:12:30 am
|
|
If you are referring to the tab deleting multiple selected rows of code, instead of indenting them all, then that's a feature that the IDE hasn't implemented.
If you are looking for a more traditional IDE experience you are probably better off using NotePad++ (or another good text editor) or Eclipse (search the forum for instructions on how to use Eclipse).
|
|
|
|
|