Show Posts
Pages: [1] 2 3
1  Development / Suggestions for the Arduino Project / Re: USB-Serial adapter gets "lost" on: March 08, 2012, 11:34:51 am
This can be caused by unplugging while the Serial Monitor is open.  I've usually found that I can get the USB-Serial to talk again, but it will be on a different port.

You may be able to end the Serial Monitor task to get out instead of rebooting.  Task Manager in Windows.
2  Using Arduino / Motors, Mechanics, and Power / Re: newbie: how to count pwm pulses on: December 31, 2011, 03:34:26 am
Um Grumpy_Mike, did you read the post?  Stepper motors are speed controlled by the frequency of pulses to their pins, and the driver uses a clock input to control the speed based on frequency.

If you read the first line under features (on the first page) in the pdf datasheet, you might have realized this.

You are thinking of RC servos.  Totally different animals, which are indeed controlled with variable pulse width, at a (normally) fixed frequency.  They were not mentioned, nor are they relevant.

To andreacuozzo:

Congrats on getting your steppers working so easily!

You can use timer interrupts to continuously run the motor(s) in the background.  There is a library on the playground for using timer1.
What you want is an interrupt which toggles the clock pin.  You can then control the speed using setPeriod().  Just remember not to exceed the driver's max frequency.
3  Development / Suggestions for the Arduino Project / Re: Sketchbook, example and library menus too large, not wrapping on: December 10, 2011, 11:57:44 pm
I'm running WinXP SP3, on a laptop.  I tested the problem in IDE versions 1.0, 0023 and 1.0 modified for Teensy.  Java version is what comes with the downloads:
4  Development / Suggestions for the Arduino Project / Sketchbook, example and library menus too large, not wrapping on: December 10, 2011, 02:03:23 am
Basically, if you have too many sketches in one folder or libraries, the lower parts of the dropdown lists in the IDE menus get cut off if they hit your screen limits.

Really, the dropdowns should wrap around the screen (like WinXP All Programs in the Start menu), or scroll.

For the sketchbook, this shouldn't happen if you keep it organized into folders.  While you can do this for libraries, it is not an optimal solution.
5  Using Arduino / Microcontrollers / Re: Best ATMega328 programmer? on: December 09, 2011, 11:48:56 pm
There is also the Pololu USB AVR programmer.  It is an ISP programmer, but also has a six pin header serial port which can be used to bootload Arduinos.  It doesn't use the same pinout as the FTDI adapters from Sparkfun and ada, but you already have to solder to it, so a simple rerouteing of wires is easy.  Do make sure to follow their instructions for installing the driver.

To use it as an ISP directly from the Arduino environment, just add theses three lines to the end of programmers.txt in /Arduino/hardware/arduino/
Code: ISP v2

It's not the cheapest option, but a standalone ISP is nice compared to using another Arduino.  They also sell it bundled with some of their controllers, including the Baby Orangutang.

As a side note, I don't work for Pololu, I'm promoting this option because I've been using it and it works well.
6  Using Arduino / Microcontrollers / Re: Arduino microcontrollers and FPGA on: December 09, 2011, 11:30:11 pm
There are also some Arduino based projects out there.  Notably Leaflab's maples and Digilent's Chipkit.  They each use custom core file sets, and very few libraries work with them, but the cores give you the same basic operation, with many times the speed.

Chipkit is based off of PIC32s, and Leaflabs uses st32 ARM chips.  They each have advantages, but it really comes down to this: Maple is better documented, and Chipkit is more directly code compatible.

I would not rate either of them as beginner friendly though.

Arduino is currently developing an Atmega SAM3U ARM based Arduino called the Due.  You can read more about that here.
7  Development / Other Software Development / Re: Multithreading on Arduino? on: December 02, 2011, 03:53:54 pm
I'd just like to state I would not want Arduino to have an(RT)OS running by default.  I say this after having used RobotC for vex, which has an underlying RTOS, which runs even when you only write one task.  When I use a microcontroller, I expect to have full control (meaning the kind of control we have now with Arduino) over timing.

I don't see (RT)OSs as necessarily bad, even on an Arduino.  But I would definitely not want it running unless needed, and then only as an externally #included library.  If having a library (RT)OS would require a slower version of the Arduino core, then I would prefer the unmodified core, and a separate version of the IDE/Core with the required changes, such that I don't have to use them.

This is of course my personal opinion.  My RTOS experience comes from RobotC running on a PIC18F (Vex microcontroller), and I specifically remember critical timing not working well, with the random 20ms pause here and there.  You might say I had a bad experience.  I also learned how to program without using multiple tasks, and for most projects done on a 8bit microcontroller, they are not necessary.
8  Development / Suggestions for the Arduino Project / Re: Please include some form of step by step debugging on: October 25, 2011, 08:55:45 pm
Would this imply that there is in fact a major advantage to PICs?  Even PICs which can't be hardware debugged (due to low pin count, older, etc.) can be simulated in MPLAB, with a free simulator.

I speak of 8bit PICs of course.

But there really isn't a low cost (<$50) debugging solution for Mega328s?

Oh, and Grumpy_Mike, the fact that they don't correlate directly is usually not a problem.  It only takes a slight bit of (artificial) intelligence to map the steps back to C.  Again, done by a free PIC simulator and low cost debugging solution (PICKit2) all the time.  It should be even easier with Atmega chips due to the use of the branch asm commands, which are more like C/C++ conditionals than other command set solutions.  Also, while assembly can be quite difficult to write, it is actually pretty easy to read once you understand the basics.  Just keep the manual nearby.

In the mean time, you can do pretty well with Serial.print() statements and reading through your code.
9  Using Arduino / Sensors / Re: Nightlight on: June 16, 2011, 06:37:20 pm
It looks like you plugged the photoresistor into the first digital pin.  Only pins A0-A5 can be used to read an analog sensor.  analogRead(0) will read from the pin marked "A0," so you can simply move the wire to that pin and your program should work.
10  Using Arduino / Installation & Troubleshooting / Re: Trouble uploading to board on: June 11, 2011, 07:11:46 pm
Make sure that the proper board is selected from the "Tools/Board" menu.
11  Development / Suggestions for the Arduino Project / Re: Line Numbers on: June 10, 2011, 12:08:36 am
Hehe, it would be best you don't temp me.  That kind of coding is best left to people who have an idea of what they're doing when it comes to non-embedded programming.

I did forget that the Arduino guys don't like to make major changes to the editor, and leave that mostly to the Processing crowd.
12  Development / Suggestions for the Arduino Project / Re: Line Numbers on: June 09, 2011, 03:31:51 pm
Wise guy...  Line numbers on every line, like any normal programming editor.  It makes finding errors listed by line number much faster.  I don't know why this hasn't been incorporated yet.  It's been asked for for a lone time.
13  Using Arduino / General Electronics / Re: 6.6V on: June 07, 2011, 09:43:49 pm
You can read higher voltages, but you will need another resistor, to create a voltage divider.

Wikipedia has a good page on resistor voltage dividers.  You want the intro and general case sections.

What that page doesn't tell you is what resistance to start with.  Basically, you want to minimize the current flowing into the Arduino.  I like to start generally with 10KOhms for the bottom (ground side) resistor, and then calculate the other one from that, hoping it matches closely to a standard resistor value.

This page has an excellent voltage divider calculator.  However, it does not match it to common resistor values.  I ran it for a 6.6V max input, and then compared it to common values and came up with a 3.3KOhm and 10KOhm resistor, with the 10K connected to ground.
14  Development / Other Software Development / Re: Request better IDE startup on: June 07, 2011, 01:53:58 pm
Ctrl-Q remembers both size and last .pde for me, version 0022, Windows 7 64 Home Premium.

If only the "close" button was made a "quit" button.
15  Development / Other Software Development / Re: Arduino IDE suggestion on: June 07, 2011, 12:45:37 pm
(and the Arduino does not have) is a single step process for troubleshooting.
Have you looked at how big the debugger is? How do you propose to fit a debugger on the Arduino? How would you interact with the debugger? The Arduino does not have a keyboard or a monitor?

Realistic request are one thing. This is something else.

You do it like MPLAB for PICs.  Simulate it on the computer.  Actually, I think the "verify" should do this.  Debugging gets done before the code ever has to even touch the microcontroller.  Also, this would allow people to buy an Arduino and "program" it using the simulator before it even ships to them.

I'm going to check out virtual breadboard again, since that is supposed to offer basically what you are asking for.  To bad it has to be a large separate program.
Pages: [1] 2 3