« first day (2657 days earlier)      last day (1660 days later) » 

00:35
About a year ago someone (Nick Gammon I think) posted here in chat a link to a particular Atmel forum whereby you could post paid jobs for little electronic designs - Arduino Forum - Products and Services or Arduino Forum - Gigs and Collaborations
 
3 hours later…
03:29
0
Q: How to avoid having my posts flagged as spam or self-promotion?

Nick GammonHow do I make references to my own products (eg. circuit boards) or libraries, without having my post flagged as spam or self-promotion?

 
14 hours later…
17:41
Woh, Nick Gammon
The god himself
So I'm gonna post this to think through the potential issue.
In void setup, there is this SD card stuff:
Serial.begin(9600);


/* SD */

pinMode(v44, OUTPUT);
digitalWrite(v44, HIGH);

while (!Serial)
{
; // wait for serial port to connect. Needed for native USB port only
}

Serial.print("Initializing SD card...");

// see if the card is present and can be initialized:
if (!SD.begin(chipSelect))
{
Serial.println("Card failed, or not present");
// don't do anything more:
while (1);
}
Serial.println("card initialized.");
// // //
// I want to move pinMode(v44, OUTPUT);
// and digitalWrite(v44, HIGH);
// to void loop. The program will be asleep most of the time, so I think this is necessary to do--so that pin isn't set to 5 V all the time.
// Although, I don't want to continually initialize the SD card when it is out of sleep mode.
//Hm. I think just an if-statement is needed.
 
1 hour later…
18:52
testing
bool hasRun = false;





//===============ONCE

Serial.begin(9600);




//===============LOOP


/* SD */

pinMode(v44, OUTPUT);
digitalWrite(v44, HIGH);



/* Call initializeSD */

if(hasRun == false) //if false execute function
initializeSD();
//************************************
// Initializes SD card adapter
//
//************************************
void initializeSD() {

while (!Serial)
{
; // wait for serial port to connect. Needed for native USB port only
}

Serial.print("Initializing SD card...");

// see if the card is present and can be initialized:
if (!SD.begin(chipSelect))
{
Serial.println("Card failed, or not present");
// don't do anything more:
while (1);
}
Serial.println("card initialized.");


hasRun = true;

}

« first day (2657 days earlier)      last day (1660 days later) »