|
4233
|
Using Arduino / Programming Questions / Re: How to get readings from 2 different "anaglogWrite"
|
on: February 28, 2011, 11:51:21 pm
|
// change the analog out value: analogWrite(analogOutPin, outputValue2); analogWrite(analogOutPin, outputValue); I don't know what "add them together" and "overwrites each other" means. However, this section of code means the pin 'analogOutPin' will, most of the time, be outputting a PWM value of 'outputValue.' Writing two different values back to back are just going to result in the last value you write.
|
|
|
|
|
4235
|
Using Arduino / Programming Questions / Re: RTC time error
|
on: February 28, 2011, 05:17:12 pm
|
|
What RTC are you using? There are quite a few out there. How is it wired up?
If it is in fact returning the date instead of the hours and minutes, you should probably determine why that is happening. What code you using to read it?
|
|
|
|
|
4236
|
Using Arduino / Programming Questions / Re: Opening a txt file.
|
on: February 28, 2011, 03:34:17 pm
|
That would be too much for a Duemilanove/Uno, etc., but Mega has enough memory for this. True only as long as the data is stored in PROGMEM. Even then, the Mega still only has 8k of SRAM to work with. Any kind of processing of the file's data is going to be tricky.
|
|
|
|
|
4237
|
Using Arduino / Programming Questions / Re: Opening a txt file.
|
on: February 28, 2011, 11:54:19 am
|
And it is very big, like 1000 chars of height and 150 of width. 1000 * 150 = 150,000. That's 150k of single bits. If it is ascii 1 and 0s, then it is 150,000 * 8 = 1,200,000 bits. The Arduino Mega only has 8k of RAM and only 256k of Flash memory. So you don't have any method of storing that much data on the Arduino, which is why SD Card has been given as a suggestion. Keep in mind, that even once you store that much data somewhere, you only have 8k of RAM to work with the file. That is going to be very, very difficult on the Arduino.
|
|
|
|
|
4240
|
Using Arduino / Microcontrollers / Re: Warm atmega328p
|
on: February 26, 2011, 12:15:37 am
|
|
Without measurements you cannot be certain. However, if the IC is getting warm, there is most likely a fault inside of the IC. (IC being ATmega328).
|
|
|
|
|
4241
|
Using Arduino / Programming Questions / Re: Arduino board resets after Switch...Case?
|
on: February 25, 2011, 04:18:51 pm
|
the power being fed off the arduino GND & 5V (I also have 4 AA batteries plugged into the arduino to help in power). The Arduino will only use USB or power from the Vin (the DC Jack). Not both. 4 AA Alkaline batteries at 1.5V each will only provide 6V--best case. So 1) that's not really enough for the on-board regulator to function properly (it needs to see a minimum of 7V), especially under load and 2) the auto-switch circuit will always use USB over the batteries.
|
|
|
|
|
4244
|
Using Arduino / Programming Questions / Re: Date and Time
|
on: February 24, 2011, 05:41:21 pm
|
|
Couple of thoughts:
1. I would say it depends on which RTC you are using and how much accuracy you want. For example, the DS1307 loses 1-2 second a day, assuming you have a well designed oscillator.
2. Do the seconds even matter? If you are time stamping something, knowing what the current actual time allows you to determine the stamped time.
3. You might consider creating a serial command that resets the seconds to zero. (Or serial interface to set the clock.)
|
|
|
|
|
4245
|
Using Arduino / Programming Questions / Re: Date and Time
|
on: February 24, 2011, 05:29:34 pm
|
|
If you look at the library for the DS1307, there is an example Arduino sketch and a Processing sketch that will sync the RTC to your computer's clock. (You need to run both of them obviously.)
Otherwise, you'll have to programmatically do it.
|
|
|
|
|