Show Posts
Pages: 1 2 3 [4] 5 6 ... 411
46  Using Arduino / Project Guidance / Re: Arduino + Hue? on: July 20, 2014, 11:01:24 am
Thanks but I think you can surmise from my post count that I already knew that.  
I wasn't responding to you, duh.
47  Using Arduino / Project Guidance / Re: Arduino Programs on: July 20, 2014, 10:28:48 am
It is an arduino with a 2.8 tft screen that I want to use for games and applications.
Which Arduino?  Because if you're talking the popular 8-bit kind with a few k of RAM, I think you might need to re-consider what kind of "games" and "applications" it can run.
48  Using Arduino / Project Guidance / Re: Arduino + Hue? on: July 20, 2014, 10:03:27 am
Maybe start with this?

https://github.com/bsalinas/ArduinoHue

I used the complicated google search term "Arduino + Hue".
49  Using Arduino / Project Guidance / Re: Arduino Programs on: July 20, 2014, 09:46:19 am
A "hex code interpreter" is the processor itself.

Is this what you want?
http://bitlash.net/
50  Using Arduino / General Electronics / Re: What capacitor will keep arduino live for 500ms? on: July 17, 2014, 09:27:48 am
Here's how I calculate hold up.  Start with an equation that determines energy in terms of voltage and capacitance.  Then solve for C.

E = (1/2 C * Vstart^2 -  1/2 C * Vdropout^2)

For the algebra challenged, here's the steps broken down to solve for C.  
1.  Take your circuit's current times the circuit's voltage, to get Power (then double it)
   P = 2x (Voltage * Current)

2.  Calculate energy required by multiplying power by time.
 E = Power x HoldUpTime

3.  Calculate the V^2
Vrange = Vstart^2 - Vdropout^2

4.  Solve for C.
C = E / Vrange


An Arduino board by itself draws 30-40mA depending on which regulator, so assume 50mA for margin.  The ATmega328 chip is only rated to 4V (or so) at 16MHz.  


1.  P = 5V * 50mA = 250mW * 2 = 500mW
This is an extreme estimate.

2. E = 500mW * 500mS = 250mJ
Time is 500mS (or recalculate for 100mS)

3.  Vrange = 5^2 - 4^2 = 9V
The 4v dropout is probably higher than it really is, so you get some additional margin.

4.  C = 250mJ / 9V = 0.02777 F
So thats 27mF or 27,778uF.

I'd probably round up to a 33,000 or 47,000uF.  However, the whole calculation has lots of margins built into it, so its your call.

No need for a Supercapacitor/EDLC.  You can get away with a regular aluminum electrolytic.  Not critical, but try to get the lowest ESR you can.  
51  Using Arduino / Programming Questions / Re: Using a short to prevent program form running on: July 17, 2014, 09:03:20 am
Specifically, you need to configure it as INPUT_PULLUP.

Not needed with the code posted, since that does a digitalWrite(pin, HIGH) which will enable the internal pull-up for input pins.
Well, no.  Since the code posted configured the pin as an OUTPUT...
52  Using Arduino / Programming Questions / Re: Using a short to prevent program form running on: July 16, 2014, 10:37:42 pm
Thanks for all of this but I am still battling to picture it all.
Code:
void setup()
{    
    pinMode(13, INPUT_PULLUP);
 
}
This line tells the Arduino to make Pin 13 an INPUT and it connects a resistor internally to 5V (VCC).  So if *nothing* is connected to the pin, it is "pulled up" to a HIGH.  If the pin is connected to GND then the pin will be "pulled down" to a LOW.

The key is the "_PULLUP".  Without that resistor, the pin's value would randomly float between a HIGH and LOW.

and then in the loop

Code:
void loop()
{
    if (digitalRead(13)==LOW) {
      //  The actual program....
    }
As I said above, when the pin is connected to GND, the pin goes LOW, so then the if-statement becomes TRUE and begins to execute.
53  Using Arduino / Programming Questions / Re: Can you set up multiple delays in your program? on: July 16, 2014, 10:34:39 pm
What do you mean "multiple delays"?

Your code would benefit, significantly, from for-loops.

http://arduino.cc/en/Tutorial/ForLoop

Code:
  alpha4.writeDigitAscii(3, '1');
  alpha4.writeDisplay();
  delay(1);
  alpha4.writeDigitAscii(3, '2');
  alpha4.writeDisplay();
  delay(1);
  alpha4.writeDigitAscii(3, '3');
  alpha4.writeDisplay();
  delay(1);
  alpha4.writeDigitAscii(3, '4');
  alpha4.writeDisplay();
  delay(1);
  alpha4.writeDigitAscii(3, '5');
  alpha4.writeDisplay();
  delay(1);
  alpha4.writeDigitAscii(3, '6');
  alpha4.writeDisplay();
  delay(1);
  alpha4.writeDigitAscii(3, '7');
  alpha4.writeDisplay();
  delay(1);
  alpha4.writeDigitAscii(3, '8');
  alpha4.writeDisplay();
  delay(1);
  alpha4.writeDigitAscii(3, '9');
  alpha4.writeDisplay();

Turns into:
Code:
  for(int i='1'; i =< '9'; i++) {
    alpha4.writeDigitAscii(3, i);
    alpha4.writeDisplay();
    delay(1);
  }

If you got really clever, you could use function calls to cut down even more.
54  Using Arduino / Installation & Troubleshooting / Re: Serial Monitor will not display anything on: July 16, 2014, 10:29:00 pm
Code?
55  Using Arduino / Networking, Protocols, and Devices / Re: Why Arduino can't connect over wireless network? (Wifi Shield) on: July 16, 2014, 10:25:45 pm
WEP is basically no encryption anyway.
56  Using Arduino / Installation & Troubleshooting / Re: "board at com3 is not available" on: July 16, 2014, 10:25:02 pm
The board selected is "Due", not "2560".
57  Using Arduino / Programming Questions / Re: Nontrivial compiling issues on: July 16, 2014, 04:01:04 pm
Looks like an old library, pre-1.0.

You might be able to get away with a simple change in LCD12864.cpp.

Change "Wiring.h" to "Arduino.h".
58  Using Arduino / Programming Questions / Re: Not writing to SD on: July 16, 2014, 03:58:49 pm
Something non-obvious is going on if adding/removing seemingly unrelated code changes behavior.  Generally leads one to think of memory issues.

Code:
  unsigned long timelog[100];
  int datalog[100];
That's 600 bytes of of your 2048 bytes of RAM.  Plus serial, plus LiquidCrystal, and plus SD, maybe you're running out of RAM.

For a test, drop your 100 elements (update your for-loops) down to 16 and see if that changes the behavior.

Also, wrap all of your strings in F() tags like this:
  sd.errorHalt(F("opening speed.txt for write failed"));
   Serial.print(F("ADC: "));

That'll keep them out of RAM.  F() won't work on the myFile.open(), so don't use it there.


Also, what do you have going on here:

Around line 48
Code:
  //for(int i = 0;1 < 3;i ++) {
    for (int i = 0; i < 100; i ++) {

this looks like you were trying to nest a  for() loop inside of another, but why are you using the same name for the increment variable?  Is this included in the "lcd code" you comment out?
59  Using Arduino / Programming Questions / Re: Not writing to SD on: July 16, 2014, 03:23:50 pm
Where are setting your SD/SPI chipSelect pin to an OUTPUT?
60  Using Arduino / Programming Questions / Re: 'SD' not declared in this scope on: July 16, 2014, 01:33:08 pm
And post the error messages you are getting.  

Ideally both code and error messages wrapped in [code][/code] tags.
Pages: 1 2 3 [4] 5 6 ... 411