Show Posts
Pages: 1 2 [3] 4 5 ... 10
31  Forum 2005-2010 (read only) / Syntax & Programs / GICR |= (1<<INT0) on: December 28, 2006, 03:22:56 pm
hello there,

GICR |= (1<<INT0)

i am fiddling with this expression. It is used to set a single bit in the GICR register, but i have no clue about how that is done.

|= means logic NOR

but from there i'm confused.

anyway, this is the code to set the bit, but how to set it again to 0? not by changing the one with a zero. i've tryed that.

The above expression enables the INT0 interupt on the arduino, but i want to disable it further down the code.
32  Forum 2005-2010 (read only) / Syntax & Programs / Re: reset millis() ? on: January 04, 2007, 04:08:25 am
so, to be on the safe side, i would use

extern volatile unsigned long timer0_overflow_count;
in my declarations

and reset it with

timer0_overflow_count = 0;

anytime i want in my code.
33  Forum 2005-2010 (read only) / Syntax & Programs / reset millis() ? on: January 03, 2007, 05:01:58 pm
Hello all,

is it possible to reset millis() to zero? because millis() will overflow in about 9 hours, it is better to let it go to zero in a controlled enviroment at a convenient time is stead of in the middle of a calculation.

34  Forum 2005-2010 (read only) / Syntax & Programs / Re: Data size Notes on: December 04, 2006, 06:18:23 pm
well, it does'nt make sens to me.

if i read the document in the link, I am unable to find the code example.
const char foo[] PROGMEM = "Foo";

Should i just use that line and replace foo with my own variName?
35  Forum 2005-2010 (read only) / Syntax & Programs / Re: reading - writing multiple pins simultaneously on: November 29, 2006, 05:54:56 pm
and how would you read the pins?

digitalRead(PORTB); //


someVariable = PORTB;
36  Forum 2005-2010 (read only) / Syntax & Programs / Re: Setting Analog Read Sample-Rate on: November 29, 2006, 06:08:48 pm
you could use a external clock to trigger the measure. like a simple rough 555 timer. the hickup is the serial interface. it will mess up your internal timing
37  Forum 2005-2010 (read only) / Syntax & Programs / Re: Linux Analog load meter, on: November 29, 2006, 06:05:27 pm
so if i read your setup correct, you have a sensor, a linux computer and a arduino. info passes from the sensor via the computer to the arduino and back. sensor measures, and the arduino sets the leds on the sensor.

am I right?

would it not be much simpler if you would connect teh leds directly to the arduino? then you could use just one way transfers via serial.
38  Forum 2005-2010 (read only) / Syntax & Programs / counting pulses on: November 27, 2006, 06:22:40 pm
Hello all.

Is there a way to count pulses coming in a train on one pin? and another pin giving start and stop time by getting high or low? i was thinking about mesuring a status on a pin, wait for a small time and check again. then compare these values to get a difference. is this the right way to go?
39  Forum 2005-2010 (read only) / Development / Re: ShiftRegLCD lib (LiquidCrystal 3-wire replacement) on: February 21, 2010, 03:47:06 am
could you please edit the previous message so i don't have to stand 10 meters from my screen to see the picture? 640x480 will be enough...
40  Forum 2005-2010 (read only) / Development / Re: ShiftRegLCD lib (LiquidCrystal 3-wire replacement) on: October 05, 2009, 04:33:31 am
thanks for your reply.
the contrast is ok. i can read the first line perfectly. last night i was connecting the display directly (4 bit parallel) with the arduino 0017 demo code, but could'nt get it to display info at all, so it could be that the lcd ids faulty. i will, receive another one this week, so i can check that later.

nice job!
41  Forum 2005-2010 (read only) / Development / Re: ShiftRegLCD lib (LiquidCrystal 3-wire replacement) on: September 30, 2009, 04:02:15 pm
hello all,

ive build the 74ls164 setup with a 16x2 display, and it only wants to display text on the first line. even lcd.setCursor(2,1) did not work. even to setCursor(2,0) it did'nt listen.

if i initialize the lcd with ShiftRegLCD srlcd(9, 10, 8, 2); i get a non functioning lcd. no characters show up.
ShiftRegLCD srlcd(9, 10, 8, 1 ); is working fine.

any ideas?
42  Forum 2005-2010 (read only) / Development / Re: library include search order? on: June 04, 2010, 03:10:11 pm
ai. not the same for all os-ses. that is inconvieniant. i am using osx, but the idea was to mak a "corrcted" arduino library and include it in the cores dir for a specific avr chip. as you might know, i'm in the process of porting the cores to a attiny85 and most of it works, but a lot of the libraries are atmegaxx8 only so they need some help. it would be nice to have a standard search order with a fallback to the internal libs in the ide.
43  Forum 2005-2010 (read only) / Development / library include search order? on: June 04, 2010, 01:29:52 am
Hello all,

i am wondering what the search order is for a library to be included in a sketch.

I get the feeling that the search starts in the arduino app itself and then continues to the ~/Documents/Arduino/Libraries directory and maybe even further.

Because some internal arduino ide libraries are very hardware specific written, it would be nice to have the ~/Documents/Arduino/hardware/<special hardware> directory higher in the search order so you can overrule the build in libraries.
44  Forum 2005-2010 (read only) / Development / Re: Flash: A new PROGMEM library on: December 07, 2009, 03:03:57 am
Ah. a macro is just a declaration. of course.  smiley-razz
45  Forum 2005-2010 (read only) / Development / Re: Flash: A new PROGMEM library on: December 06, 2009, 05:01:30 pm
i got a compile error using your library.

"error: 'cosarray' was not declared in this scope In function 'void closedoors()':"

Arduino 0017
Arduiniana flash 2.0

code snippets:
#include <Flash.h>
#include <EEPROM.h>
void setup(){
 FLASH_ARRAY(float, cosarray,
  cos(72),cos(76.5),cos(81),cos(85.5)); //define array of cos(x) in progmem


void opendoors(){
      stepper(int(minDelay + delayVal + cosarray[trajectCounter]*(maxDelay)));


i have no idea what goes wrong. FLASH_ARRAY is red, so is recognized by the ide

the next uses a direct paste from and yelds the same error. :-(

#include <Flash.h>
float result = 0;

void setup(){
  FLASH_ARRAY(float, temperatures, 23.1, 23.1, 23.2, 23.2, 23.4,
    23.7, 25.0, 26.0, 26.8, 28.8, 30.2, 31.9, 33.1, 33.1, 33.2,
    33.2, 33.4, 33.7, 35.0, 36.0, 36.8, 38.8, 40.2, 41.9);

void loop(){
  result = temperatures[4];
Pages: 1 2 [3] 4 5 ... 10