Show Posts
Pages: 1 ... 71 72 [73] 74 75 ... 97
1081  Using Arduino / Project Guidance / EEPROM better than SD card for audio ? on: September 20, 2011, 10:02:58 am
I have a project that uses up to 9 audio announcements of about 4 seconds duration.
At the moment I am using a SD card, and the waveHC library, but unless I use a SD card of 250Mb or less it is unreliable, and sometimes won't read the card.

Would it be better to use some EEPROMs ?    the audio tracks are between 250 and 850k, but I am sure i can reduce the sampling without hassles.

I just need some advise here..........
1082  Using Arduino / Storage / Re: EEPROM overwite previous data? on: September 10, 2011, 02:01:51 am
True Bob,  I do have prescription glasses that darken in sunlight, I forgot to test them on the white LEDs, I must check that.

On a serious note, one of my suppliers has a display with all the different colour LEDs on all day, including the blue ones that I use for illuminating flourescent targets,( they have so much ultra violet content.)
I have warned him about damage to his counterstaffs' eyes, I temporary ( 2 hours or so ) lost the sight of one eye a couple of years back when experimenting with a couple of ultraviolet LEDs, so I am very wary now.
1083  Using Arduino / Storage / Re: EEPROM overwite previous data? on: September 09, 2011, 05:15:13 pm
I blame it on being hard to read the screen after 3 days testing the previous project with 1000 ultra bright white LEDs :-)   I could literally switch off the rooms normal lights without seeing any difference - depending on the numbers being displayed of course !
1084  Using Arduino / Storage / Re: EEPROM overwite previous data? fixed on: September 09, 2011, 08:05:31 am
I found the problem.....

I had  Wire.endTransmission();    after setting the pointer , removed it and it works
1085  Using Arduino / Storage / Re: EEPROM overwite previous data? on: September 09, 2011, 07:41:18 am

I am back on the RTC project again, and am having trouble writing to the DS1307s RAM,  I have tried a basic sketch just to store and retreive some data ( below )
Am I doing something stupid here?  It just gives me the old data back from the RAM

Code:

/*  just loading the ram for testing
 */
#include <Time.h> 
#include <Wire.h> 
#include <DS1307RTC.h>  // a basic DS1307 library that returns time as a time_t
byte prevday ;          //  prev days of month for display
byte prevmonth ;         //prev month for display
byte prevyear ;         //prev year  for display
byte prevbest ;   // highest longest interval up to 99
byte upperbyte;   //  of previous unix days
byte lowerbyte;   //  -"-
unsigned long old_unix_days;
unsigned long  unidays;
unsigned long  unisecs;
//*************************************************************************************
void setup()  {
  Serial.begin(9600);
  setSyncProvider(RTC.get);   // the function to get the time from the RTC
  if(timeStatus()!= timeSet)
     Serial.println("Unable to sync with the RTC");
  else
     Serial.println("RTC has set the system time");     
     Wire.begin(); // no address, we are master
  Serial.begin (9600);     
}
void loop()
{
 
 
    prevday = 12;
  prevmonth= 10;
  prevyear = 33;
  prevbest = 87;
  upperbyte = 22;
  lowerbyte = 44;
 
 Wire.beginTransmission(0x68); 
  Wire.send(0x08);  // to start of RAM
  Wire.endTransmission(); 

 
 
  Wire.send (prevday);
  Wire.send (prevmonth);
  Wire.send (prevyear);
  Wire.send (prevbest);
  Wire.send (upperbyte);
  Wire.send (lowerbyte);
  Wire.endTransmission();
 Serial.println("finished loading"); 

  Wire.beginTransmission(0x68); 
  Wire.send(0x08);  // to start of RAM
  Wire.endTransmission(); 
  Wire.requestFrom(0x68,6 );  // Read back first six RAM addresses
  prevday = Wire.receive();
  prevmonth = Wire.receive();
  prevyear= Wire.receive();
  prevbest = Wire.receive(); 
  upperbyte = Wire.receive(); 
  lowerbyte = Wire.receive();
  Serial.print ("prev day read " );
  Serial.println (prevday, HEX);
  Serial.print ("prev month read " );
  Serial.println (prevmonth, HEX);
  Serial.print ("prev year read " );
  Serial.println (prevyear, HEX);
  Serial.print ("prev best read " );
  Serial.println (prevbest, HEX);
  Serial.print ("upperbyte read " );  Serial.print (upperbyte, HEX); Serial.print (" ,  upperbyte read " );  Serial.println (upperbyte, HEX);
  Serial.print ("lowerbyte read " );  Serial.print (lowerbyte, HEX);  Serial.print (",   lowerbyte read " ); Serial.println (lowerbyte, BIN);
  long old_unix_days = word (upperbyte, lowerbyte);
  Serial.print(" old_unix_days = ");  Serial.print (old_unix_days); Serial.print(",   old_unix_days = "); Serial.println(old_unix_days, BIN);
}
1086  Community / Bar Sport / the brains OK, but the eyes are gone :-) on: September 04, 2011, 12:53:29 pm

Wasted a bit of precious time today trying to find why my arduino chip did nothing when plugged into a board I have made as an interface ( I have used the same pcb before with no problems )

What threw me was the 78L05 on the board was getting hot , which wasted a lot of my time looking for shorts.

It turned out that one of the two tiny  22Pf caps on the crystal was marked 22J and the other 221  ( 220pF ! )

They both came from my same draw, so I dont know when the rogue one got there.
I will now keep my magnifying glass nearby, and accept my age !
1087  Using Arduino / Programming Questions / Re: why no curly brackets in blink without delay ? on: August 23, 2011, 04:17:03 pm
that was my first thought, but its a bit obvious
1088  Using Arduino / Programming Questions / Re: why no curly brackets in blink without delay ? on: August 23, 2011, 10:54:41 am
My granchildren can do 15 divide by 3 or 5,   or 8 minus 3 or 5 very easily , and cheap   smiley-cool

1089  Using Arduino / Programming Questions / Re: why no curly brackets in blink without delay ? on: August 23, 2011, 08:50:58 am
var = 8 - var;     looks the easy
1090  Using Arduino / Programming Questions / Re: why no curly brackets in blink without delay ? on: August 23, 2011, 05:43:52 am
OK so how does that work, and are Mr Gammon's expensive less than my dividing ?
1091  Using Arduino / Programming Questions / Re: why no curly brackets in blink without delay ? on: August 23, 2011, 04:50:33 am
I'll think about it when I have finished my rush job, it sounds like a " take away the number you first thought of" question  smiley-razz
1092  Using Arduino / Programming Questions / Re: why no curly brackets in blink without delay ? on: August 23, 2011, 04:44:23 am
I am a newbie remember, bu t is it something like  x = 15/ x   ???
1093  Using Arduino / Programming Questions / Re: why no curly brackets in blink without delay ? on: August 23, 2011, 04:14:01 am
thank guys,  that makes sense, and the     ledState = !ledState;    is so self explanatory I will stick to that in future.
1094  Using Arduino / Programming Questions / why no curly brackets in blink without delay ? on: August 23, 2011, 03:11:31 am
I have always used curley brackets around both if and else instructions, as per reference,  but I have just noticed that there are none in the if/else part of the blink without delay example.

  // if the LED is off turn it on and vice-versa:
    if (ledState == LOW)
      ledState = HIGH;
    else
      ledState = LOW;

Whats the difference / advantage?
1095  Using Arduino / Networking, Protocols, and Devices / Re: VirtualWire without PTT ? on: August 22, 2011, 01:23:35 am
I usually use the ptt output to power the Tx, it comes up in plenty of time not to miss any data, and the TX only draws about 10mA.
This way there is no quiescent current drawn by the Tx, even the cheapy ones, between transmissions.

In my current project, I needed 18 pins as input/outputs, so I generated my own ptt from one of my scanning line outputs charging a cap via a diode to keep the TX on, which works fine. ( the ptt of the Tx is 1Mohm impedance )

Even if you dont use the PTT, it seems the VirtualWire setup sets it as an output, ( and the Rx pin 11 as an input,) but I have found you can simply change them back after the VWsetup instruction.

re the serial pins DIO0 and DIO1, I have always been wary of touching them, in case I couldn't reprogram the chip later, but it seems it is OK to use the  DIO0  RXD pin as an input for something else, but I have gone back to using pin 11 again,just in case,  after resetting it to an output.

Meanwhile I wasted half the weekend again due to my confusion with where to use INT, BIN, HEX ,CHAR,BYTE ,    :-)

I got it right in the end, but when I get some spare time I will study it properly again..
Pages: 1 ... 71 72 [73] 74 75 ... 97