Show Posts
Pages: 1 ... 33 34 [35] 36 37 ... 92
511  Using Arduino / Programming Questions / Re: Using SD card with another SPI device on: February 22, 2014, 05:25:19 pm
Try this - Untested

Code:
#include <SPI.h>
#include <SD.h>

const int chipSelect_SD=4, chipSelect_ACD=11;
File myFile;

void setup() {
  SPI.begin();
  Serial.begin(9600);
  if (!SD.begin(chipSelect_SD)){
    Serial.println("sd card initialization failed.");
  }
}
void loop() {
  String dataString = "";
  dataString+=String(adc());
  Serial.println(dataString);
  File dataFile=SD.open("DATA.txt", FILE_WRITE);
  if(dataFile){
    Serial.println(dataString);
    dataFile.println(dataString);
    dataFile.close();
  }
  else{
    Serial.println("error opening DATA.txt");
  }
  delay(5000);
}

unsigned int adc(){
  byte inByte=0;
  unsigned int result=0;
  digitalWrite(chipSelect_ACD, LOW);
  result = SPI.transfer(0x00);
  result = result << 8;
  inByte = SPI.transfer(0x00);
  digitalWrite(chipSelect_ACD, HIGH);
  result = result | inByte;
  return result;

}
512  Using Arduino / Programming Questions / Re: Help with ardudroid? on: February 22, 2014, 05:13:50 pm
Please read the sticky at the top of the forum.

And post your FULL code in the correct way.

I can't guess at the code you have (a snippet as posted is like showing a blind man an elephant by letting him feel its tail - an old story) and I generally like most, will not visit another site to download the code relating to some ones queries. It's not being picky, just realistic, this is my hobby not my living.
513  Using Arduino / Programming Questions / Re: abort for-loop at any time on: February 22, 2014, 04:18:39 pm
'dudes' ??????????????????????
514  Using Arduino / Programming Questions / Re: Help with ardudroid? on: February 22, 2014, 04:11:07 pm
Please read the sticky at the top of the forum, I have no intention of hunting around other sites for YOUR code, that you already have, and no doubt, modified as the given instructions say.
515  Using Arduino / Project Guidance / Re: Using Differential Inputs on Arduino Mega 2560 on: February 22, 2014, 04:08:54 pm
Ah - the missing information. Just buy a Current sensor from adafruit.
516  Using Arduino / Project Guidance / Re: Using Differential Inputs on Arduino Mega 2560 on: February 22, 2014, 02:58:51 pm
Or you could use an Opamp.
517  Using Arduino / Project Guidance / Re: EEVBlog shown how their kicad design was made with a PNP service anyone else use on: February 22, 2014, 01:49:47 pm
We do them - A one off would be done manually - We are UK based if this helps.
518  Using Arduino / Project Guidance / Re: Camera remote trigger - Arduino? on: February 22, 2014, 09:45:03 am
Read the Serial buffer length
if its > 0
read a byte
if its 't' (just an example) call the take pic function
Goto start

take pic function

set focus pin low (for however long)
set focus pin high
set Shutter release pin low (for however long)
set Shutter release pin High
leave function.


Just a guide
519  Using Arduino / Programming Questions / Re: Two PID Controller on one Arduino uno??? on: February 22, 2014, 09:40:11 am
Yes.
520  Using Arduino / Programming Questions / Re: RFID reader error? on: February 22, 2014, 09:38:56 am
What RFID reader are you using? a link or full make/model
521  Using Arduino / Project Guidance / Re: Pull down resistor not working as expected on: February 22, 2014, 09:36:27 am
Is the 'Ground' you are connecting to on the arduino?
522  Using Arduino / Project Guidance / Re: Pull down resistor not working as expected on: February 22, 2014, 08:52:04 am
How have you connected it? a diagram would be nice.
523  Using Arduino / Project Guidance / Re: An arduino dial up modem? on: February 22, 2014, 08:38:37 am
External Modem - 50P/$1 from flea market/yard sale/car boot or Hours of work & £10/$15 if Isolators (if you need to buy them) - I'm all for the build it because I can thing, but there are limits.
524  Using Arduino / Installation & Troubleshooting / Re: How to find broken arduino uno component(s)? on: February 22, 2014, 08:21:48 am
If you look at the schematic on the main site its there.
525  Using Arduino / Microcontrollers / Re: problem programming Attiny85 with UNO R3 and spi on: February 21, 2014, 10:34:06 am
No - there is no way to do this (I have a lead I made where the reset wire goes to pin 10)
Pages: 1 ... 33 34 [35] 36 37 ... 92