Show Posts
Pages: 1 ... 17 18 [19] 20 21 ... 36
271  Using Arduino / Project Guidance / Re: Arduino Uno ATmega328P-PU usable I/O pins on: May 20, 2013, 11:25:17 am
You can useCharlieplexing, 12 pins to drive 132 LEDs.
http://playground.arduino.cc/code/charlieplex
272  Using Arduino / Project Guidance / Re: Hexapod battery selection on: May 16, 2013, 09:22:53 am
You will need the arduino mega servo shield like this


Each servo will draw about 1 Amp of current, for 18 servo, you can get 3000 to 4000 mAH 20C 7.4V 2s1p LiPo battery, but you to drop the voltage to 6V to drive the Servo by using DC to DC converter or UBEC.
273  Using Arduino / Project Guidance / Re: Making slections using keypad from options as diplayed on LCD on: May 16, 2013, 08:56:47 am
These are two of the LCD menu system Library
https://github.com/DavidAndrews/Arduino_LCD_Menu
https://github.com/brunialti/MENWIZ
274  Using Arduino / Project Guidance / Re: Turn Arduino on and off with tactile button on: May 14, 2013, 08:51:15 pm
Is your membrane keypad a matrix keypad? what is the resistance of the contact? it may not be used as a control for on/off switch.
275  Using Arduino / Project Guidance / Re: Turn Arduino on and off with tactile button on: May 14, 2013, 08:25:22 pm
Pololu Pushbutton Power Switch SV
http://www.pololu.com/catalog/product/750


276  Using Arduino / Project Guidance / Re: controlling via RC receiver on: May 14, 2013, 08:15:25 pm
http://rcarduino.blogspot.sg/2012/01/how-to-read-rc-receiver-with.html
http://rcarduino.blogspot.sg/2012/01/how-to-read-rc-receiver-with_20.html
277  Using Arduino / Project Guidance / Re: Autonomous Robot, problem with rc and gps on: May 14, 2013, 07:47:12 pm
Still able be done with the Arduino Uno R3.

EM-406A GPS Module is using software-serial, if you change the pin connection, you have to change the soft-serial pins definition in the software.

Which Dagu Wild Thumper 4WD Chassis you used 34:1 or 75:1, the 34:1 had torque of roughly 5 kg-cm (70 oz-in) and 75:1 had higher torque of roughly 11 kg-cm (150 oz-in). What is the total weight of your car?
What type battery? AH?
Post your code will help.
278  Using Arduino / General Electronics / Re: Sizing transformer for linear DC supply on: May 14, 2013, 07:20:27 am
http://homemadecircuitsandschematics.blogspot.sg/2012/03/how-to-design-power-supply-simplest-to.html
http://www.zen22142.zen.co.uk/Design/dcpsu.htm
http://www.electronicproducts.com/Passive_Components/Choosing_capacitors_for_power_supplies.aspx
279  Using Arduino / Project Guidance / Re: Super Newb Question on switching power source on/off on: May 14, 2013, 05:58:30 am
You can not use N-Channel MOSFET to control the supply, you need logic level P-Channel MOSFET to control supply.
280  Using Arduino / Project Guidance / Re: Can you run 2 different loops in 1 sketch?? need more help.... on: May 12, 2013, 09:00:31 am
Is this what you want?
Code:
// what midi channel we're sending on
// ranges from 0 15

#define midichannal 9 // Equates to MIDI Channel 10
#define midichannal 10 // Equates to MIDI Channel 11
#define midichannal 11 // Equates to MIDI Channel 12
#define midichannal 12
#define midichannal 13

// general midi drum notes
#define note_F#
#define note_D
#define note_A
#define note_G
#define note_F
// define the pins we use
#define switchAPin 12
#define switchBPin 11
#define switchCPin 10
#define switchDPin 9
#define switchEPin 8

#define ledPin 13 // for midi out status
int switchAState = LOW;
int switchBState = LOW;
int switchCState = LOW;
int switchDstate = LOW;
int switchEstate = LOW;

int ledPinA = A5; //LED connected to analog Pin 5
int ledPinB = A4; //LED connected to analog Pin 4


int currentSwitchState = LOW;
int val,t;



void setup() {
  pinMode(switchAPin, INPUT);
  pinMode(switchBPin, INPUT);
  pinMode(switchCPin, INPUT);
  pinMode(switchDPin, INPUT);
  pinMode(switchEPin, INPUT);
  pinMode(A5, OUTPUT);
  pinMode(A4, OUTPUT);

  digitalWrite(switchAPin, HIGH); // turn on internal pullup
  digitalWrite(switchBPin, HIGH); // turn on internal pullup
  digitalWrite(switchCPin, HIGH); // turn on internal pullup
  digitalWrite(switchDPin, HIGH);
  digitalWrite(switchEPin, HIGH);
  //Turn on LED
  digitalWrite(A5, HIGH);
  digitalWrite(A4, HIGH);

  // set MIDI baud rate
  Serial.begin(57600);
}

void loop() {


  // deal with switchA
  currentSwitchState = digitalRead(switchAPin);
  if( currentSwitchState == LOW && switchAState == HIGH ) // push
    noteOn(0x90, 0x1E, 127);

  if( currentSwitchState == HIGH && switchAState == LOW ) // release
    noteOff(0x90, 0x1E, 0);

  switchAState = currentSwitchState;
 
 
    //read state of the piezo
    currentSwitchState = digitalRead(switchAPin);

    //check if piezo is pressed
    //if so, the buttonState is HIGH
    if(currentSwitchState == LOW) {

//turn on the LED
digitalWrite(A5, HIGH);
}
 
 
  currentSwitchState = digitalRead(switchBPin);
 
  if( currentSwitchState == LOW && switchAState == HIGH ) // push
    noteOn(0x90, 0x2E, 127);

  if( currentSwitchState == HIGH && switchAState == LOW ) // release
    noteOff(0x90, 0x2E, 0);

  switchBState = currentSwitchState;
 
 
    //read state of the piezo
    currentSwitchState = digitalRead(switchBPin);

    //check if piezo is pressed
    //if so, the buttonState is HIGH
    if(currentSwitchState == HIGH) {

//turn on the LED
digitalWrite(A4, HIGH);
}
 

  currentSwitchState = digitalRead(switchCPin);
 
  if( currentSwitchState == LOW && switchAState == HIGH ) // push
    noteOn(0x90, 0x3E, 127);

  if( currentSwitchState == HIGH && switchAState == LOW ) // release
    noteOff(0x90, 0x3E, 0);

  switchCState = currentSwitchState;

  currentSwitchState = digitalRead(switchDPin);
 
  if( currentSwitchState == LOW && switchAState == HIGH ) // push
    noteOn(0x90, 0x4A, 127);

  if( currentSwitchState == HIGH && switchAState == LOW ) // release
    noteOff(0x90, 0x4A, 0);

  switchCState = currentSwitchState;

  currentSwitchState = digitalRead(switchEPin);
  if( currentSwitchState == LOW && switchAState == HIGH ) // push
    noteOn(0x90, 0x5B, 127);
  if( currentSwitchState == HIGH && switchAState == LOW ) // release
    noteOff(0x90, 0x5B, 0);
  switchCState = currentSwitchState;


}
  // Send a MIDI note on message. Like pressing a piano key

  // channel ranges from 0 15


void noteOn(byte channel, byte note, byte velocity) {
  midiMsg( (0x90 | channel), note, velocity);
}

// Send a MIDI note off message. Like releasing a piano key

void noteOff(byte channel, byte note, byte velocity) {
  midiMsg( (0x80 | channel), note, velocity);
}


// Send a general MIDI message
void midiMsg(byte cmd, byte data1, byte data2) {
  digitalWrite(ledPin,HIGH); // indicate we're sending MIDI data
  Serial.write(byte(cmd));
  Serial.write(byte(data1));
  Serial.write(byte(data2));
  digitalWrite(ledPin,LOW);

}

281  Using Arduino / Project Guidance / Re: bluetooth on: May 10, 2013, 05:15:38 am
http://arduino.cc/forum/index.php/topic,108330.0.html
282  Using Arduino / General Electronics / Re: constant 12v and constant 200mA from a li-ion battery for led on: May 07, 2013, 07:44:52 am
You can get this from eBay

Automatic buck-boost With charging Constant current&Voltage Power step-up/down 4-35V to 1.25-25V
283  Using Arduino / Project Guidance / Re: Looking for USB Host overview on: May 06, 2013, 05:54:40 pm
I had found from the manual that Sprog DCC controller using as USB to serial converters, therefore USB host shields should be able to support.
284  Using Arduino / Project Guidance / Re: How to Create logic on: May 06, 2013, 06:53:59 am
you need to debounces the input, without which pressing the button once would appear to the code as multiple presses.
http://www.arduino.cc/en/Tutorial/Switch
285  Using Arduino / Project Guidance / Re: need help with LED controlling/disabling an out put on: May 06, 2013, 06:21:52 am
Code:
int led1 = 13;
int led2 = 12;
int led3 = 10;

void setup(){
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
 
}
void loop(){

  pinMode(led3, INPUT); //this does not work ??? why???
  digitalWrite(led1,HIGH);
  digitalWrite(led2,LOW);
  // digitalWrite(led3,LOW); --> If you already set it to input, don't write
  delay(500);
 
  pinMode(led3, OUTPUT); //this does not work ??
  pinMode(led1, INPUT); //this does not work ??
  // digitalWrite(led1,LOW);  --> If you already set it to input, don't write
  digitalWrite(led2,LOW);
  digitalWrite(led3,HIGH);
  delay(500);
 
  pinMode(led1, OUTPUT); //this does not work ??
  pinMode(led2, INPUT); //this does not work ??
  digitalWrite(led1,HIGH);
//  digitalWrite(led2,HIGH);  --> If you already set it to input, don't write
  digitalWrite(led3,LOW);
  delay(500);
 
  pinMode(led2, OUTPUT); //this does not work ??
  pinMode(led3, INPUT); //this does not work ??
  digitalWrite(led1,LOW);
  digitalWrite(led2,HIGH);
//  digitalWrite(led3,HIGH);  --> If you already set it to input, don't write
  pinMode(led3, OUTPUT); //this does not work ??
  delay(500);

}

Pages: 1 ... 17 18 [19] 20 21 ... 36