Show Posts
Pages: 1 ... 89 90 [91] 92 93 94
1351  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino and 4x4 led matrix on: May 15, 2009, 05:32:36 pm
Did you see this?
http://www.arduino.cc/playground/Main/DirectDriveLEDMatrix
Easy to adapt to your 4x4.

1352  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Wheel and Frame Ideas on: April 12, 2009, 11:05:55 am
Andy,
Is this built from only one lego kit, or you just used parts you had around? Did you use some inspiration or is it totally original?
I find the lego solution one of the coolest: parts are ubiquitous and cheap, they stack up and can be easily assembled amongst them, no screws to play with, no need for tools, only advantages. And it looks good as well.

1353  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: type in windows using arduino? on: April 05, 2009, 04:28:52 pm
Right, I did not pay attention, thanks.
I find this project somehow important, maybe it should be included in the playground.


1354  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: type in windows using arduino? on: April 05, 2009, 08:07:16 am
You may also want to check this article out:
http://www.obdev.at/products/avrusb/easylogger.html
This device, connected on USB,  can simulate a keyboard. I guess you only need to adapt it to arduino.
1355  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How do i get multiple serial inputs/outputs? on: April 05, 2009, 04:25:06 pm
Or switch to Arduino Mega.

1356  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Language Reference manual - Hard Copy on: March 27, 2009, 07:42:52 pm
You can either print your own (download a PDF file) or buy from here:
http://www.lulu.com/content/1108699

1357  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: pcb boards with seperated compnent holes.. on: March 21, 2009, 03:50:54 pm
Or you can wire the board on the component side as well, like here:

1358  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: ...ARDUINO clock / speed ? on: March 21, 2009, 07:33:36 pm
To keep the devices electrically separated you can use an optocouple, where both sides belong to separate circuits, similar to relays.

Out of curiosity, how are you going to trigger the camera (if not electronically), with relays or otherwise? Are you going to build some mechanical device that clicks the button, driven by the relay?

1359  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: ...ARDUINO clock / speed ? on: March 21, 2009, 03:41:42 pm
If your camera is not a mechanical one, you should be able to trigger it directly from a digital output, see this article:
http://wordpress.bolanski.com/?p=9
No need for relays.
And this is another interesting one:
http://www.glacialwanderer.com/hobbyrobotics/?p=11

1360  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Code size on: March 19, 2009, 11:32:45 am
This is my attempt answer the question "Does a bigger number of lines of code make the program run slower?".

Let's assume that the sketch has a number of functions defined (and implemented, of course), adding a lot of lines to the program.

There may be 2 situations here:

1. loop() calls a  number (or all) of these functions;
2. loop does not call any of these functions;

In case 1, the program will run slower, of course.
In case 2, the program will run as fast as if the functions would not be defined at all.

In both cases, the program is as big, regardless of the the fact that the functions are called or not (at least this happens in Arduino 011 which I am currently using).

So, the compiler generates code for all the defined functions, but that does not mean that the loop() gets executed slower, unless those functions are called in the loop().

Does this make sense?




1361  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Code size on: March 17, 2009, 10:42:41 pm
I doubt that the overall code size affects the time spent in the loop. The code for a function is there, for one to call. But if you don't call it, then no time is spent on that function.
You can measure the time spent in the loop by using millis().


1362  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Code size on: March 17, 2009, 09:27:47 pm
I noticed that (did not do further research though) code is generated even for functions that are not referenced.
So, if one has defined a function, even if that function is not called, the program size grows.

1363  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Code size on: March 17, 2009, 12:54:44 pm
Libraries, my friend, libraries...
Remember those "include"s?
1364  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Most Wanted Shield on: March 17, 2009, 01:01:55 pm
What's wrong with having multiple shields stacked up?
I see the display shield as independent from the others. RTC + eeprom + other I2C stuff can go on the second shield. And then, pressure, compass, temp and other gizmos on yet another shield.

One thing I don't understand is why the temperature sensor should be on the board. Doesn't the reading get affected by the heat dissipated by the surrounding components, especially when in an enclosure?
1365  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: LCD screen alternating??? on: March 12, 2009, 11:32:26 am
If you are considering DS1307 as your RTC, this is how it should look like:

Code:
#include <Wire.h>
#include <DS1307.h>


//--------------------------------------------------------------------------------------
/* DS1307 Real Time Clock - uses the wire library (I2C);
 *
 * RTC is set up through a separate sketch (+windows app talking on serial port).
 * I2C bus address of DS1307 is B1101000 (already defined in RTC.h).
 *
 * SETUP:     _ _                                
 *        X1-|oU |-Vcc
 *        X2-|   |-SQW/OUT square wave 1Hz output signal;
 *  Vbat(3V)-|   |-SCL     to Arduino analog 5
 *       GND-|   |-SDA     to Arduino analog 4
 *            ---
 *
 * Pull-up resistors (10k) are required on SDA (pins 5), SCL (pin 6), and SQW (pin 7).
 *
 *
 * References:
 *    http://www.datasheetcatalog.org/datasheet/maxim/DS1307.pdf
*/
//--------------------------------------------------------------------------------------

int tick = 0;


// interrupt handler for the 1Hz square wave generated by RTC (wired to arduino digital pin 3);
void SQW_1Hz_ISR()
{
  tick++;
  Serial.print("in ISR: ");
  Serial.println(tick);
}

void setTime()
{
  RTC.stop();
  RTC.set(DS1307_SEC, 20);
  RTC.set(DS1307_MIN, 07);
  RTC.set(DS1307_HR,  12);
  RTC.set(DS1307_DOW,  3);
  RTC.set(DS1307_DATE,28);
  RTC.set(DS1307_MTH,  1);
  RTC.set(DS1307_YR,   9);
}

void setup()
{
// initialize stuff here...

  // call this only once; comment out after time was set in RTC;
  setTime();

  Serial.begin(9600);

  // code courtesy of Mr. BroHogan (a.k.a. "Life Clock");
  Wire.beginTransmission(0x68);
  Wire.send(0x07);
  Wire.send(0x90);                       // 0x90=1Hz, 0x91=4kHz, 0x92=8kHz, 0x93=32kHz
  Wire.endTransmission();


  // define ISR for pin 3 (1Hz square wave from RTC);
  attachInterrupt(1, SQW_1Hz_ISR, FALLING);
}


Is this what you were looking for?

You can get some inspiration from the playground ("interfacing with hardware" section, look for DS1307, there are 2 entries).

The "DS1307" library I used was published on and downloaded from the arduino playground.
Pages: 1 ... 89 90 [91] 92 93 94