Show Posts
Pages: 1 ... 11 12 [13] 14 15 ... 34
181  Using Arduino / Project Guidance / Re: requirement of more than 14 pwm pins.. on: November 23, 2013, 04:41:20 am
Yes, right, the 2.2K was okay, give it a try, to connect to your Led driver shield. good luck  smiley
182  Using Arduino / Project Guidance / Re: Help with/advise on programming on: November 22, 2013, 11:27:23 pm
Retrolefty - Thank you I'll correct the comment.  I don't know what a "floating input" is.

BillHo - I tried connecting it to pin 4 (register select) and pin 5 (read/write)

Base on the Syntax of the LiquidCrystal() function,
Quote
Syntax

LiquidCrystal(rs, enable, d4, d5, d6, d7)
LiquidCrystal(rs, rw, enable, d4, d5, d6, d7)
LiquidCrystal(rs, enable, d0, d1, d2, d3, d4, d5, d6, d7)
LiquidCrystal(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7)

Code:
// initialize the library with the numbers of the interface pins
 LiquidCrystal lcd(31, 35, 39, 43, 47, 51);

You have Pin31 connected to rs pin 4 of LCD, why you connect pin 4 to LCD again?
The R/W pin 5 of LCD was connected to GND because you do not need to read back from the LCD.
Where is this R/W pin 5 of LCD connected to? what for?

 "floating input" -- if you read a input pin that not connected to anything, which call floating.
183  Using Arduino / Project Guidance / Re: Help with/advise on programming on: November 22, 2013, 08:49:19 pm

Code:
#include <LiquidCrystal.h>
 // initialize the library with the numbers of the interface pins
 LiquidCrystal lcd(31, 35, 39, 43, 47, 51);
 int runTimer = 1; // true condition for timer
 int serialData = 0; // false condition for serial communication
 int speakerPin = 8;
 int data = 0; // default condition
 int pbIn =24;              //digital input on pin 4
 int pbOut = 28;         //The output LCD pin
 int pb = 0;                 //The input state
 // The setup() method is where all the initialization of the hardware is performed
// It will run only once.
 void setup() {
   pinMode(speakerPin, OUTPUT);
  // Set up the digital pin 24 to an Input and Pin 28 to an Output
  pinMode(pbIn, INPUT);
  pinMode(pbOut, OUTPUT);
  // set up the LCD's number of rows and columns:
  lcd.begin(16, 2);
 }
 void loop() {
   pb = digitalRead(pbIn);      //Read the button
  if (pb == HIGH)                //The button is not pressed == HIGH
{
  digitalWrite(pbOut, LOW);
}
  else
{
  digitalWrite(pbOut, HIGH);
}
   // To execute timer only once
   if(runTimer == 1){
   // Print a message to the LCD.
   lcd.clear();
   lcd.print("Timer: ");
   //Start timer
   timer();
   }
   runTimer = 0;
   lcd.noDisplay();
   delay(250);
   // Sound Buzzer
   for(int duration = 0; duration < 100; duration ++){
     digitalWrite(speakerPin, HIGH);
     delayMicroseconds(2000);
     digitalWrite(speakerPin, LOW);
     delayMicroseconds(2000);
   }
   lcd.display();
   delay(250);
 }
 void timer(){
    // For loop to run the COUNT-DOWN in Seconds
     for(int timer = 60; timer > 0; --timer){
     // Set the Cursor to the space after the display "TIMER: "
     if(timer >= 60)
       lcd.setCursor(6,0); 
     else{
       lcd.setCursor(6,0);
       lcd.print("0");
       lcd.setCursor(7,0);
     }
     // Display the COUNT-DOWN Seconds
     lcd.print(timer);
     lcd.print("s");
     delay(1000);
     }
      // Bring the Cursor to the initial position
     lcd.setCursor(0,0);
     lcd.clear();
     lcd.print("Buzzer!");
 }
 
 

What have you connect the pbOut to?
184  Using Arduino / Project Guidance / Re: requirement of more than 14 pwm pins.. on: November 22, 2013, 07:40:54 pm
to add 12 pull-up resistors is not the problem. But which value for them? I think i need to test it. in which range should it be?


Base on the datasheet of the TLC5940 on page 14,
Quote
The maximum output current per channel is programmed by a single resistor, R(IREF), which is placed between
IREF pin and GND pin.
Imax must be set between 5 mA and 120 mA. The output current may be unstable if Imax is set lower than 5 mA.

So the resistor for the IREF pin is 10K ohms and the pullup is 1K ohms.
185  Using Arduino / Project Guidance / Re: requirement of more than 14 pwm pins.. on: November 22, 2013, 11:48:37 am
The TLC5940 is a 16-channel, constant-current sink LED driver,  if you want the same Output signal as it comes from the atmega,
you need a pull up resistor with value about 200 to 1K ohms, depend on how much current you need.
186  Using Arduino / Project Guidance / Re: light sensor on: November 21, 2013, 08:24:55 pm
Yes, TSL238.
187  Using Arduino / General Electronics / Re: switching power supply 24VDC 1A on: November 20, 2013, 08:44:13 am
How about this..

Compact Size (8.5x4x6)cm,
http://www.ebay.com/itm/24V-1A-Switching-Power-Supply-CCTV-DVR-Security-WD1-/161153549920
188  Using Arduino / Project Guidance / Re: confused ! on: November 16, 2013, 10:03:44 am
I have Arduino UNO

In my project ..  I need 20  I/O pins !

The UNO have D0 to D13 and A0 to A5, total of 20 pins, all can be digital I/O pins.
189  Using Arduino / Project Guidance / Re: Arduino Library on: August 10, 2013, 09:26:31 am
Are you refer to CharMap library cmap.h?

http://forum.arduino.cc/index.php/topic,127623.0.html
http://tiktakx.wordpress.com/tag/arduino-led-matrix/
190  Using Arduino / Project Guidance / Re: Simple Blinking project on UNO on: August 09, 2013, 04:04:48 am
I changed the amount of Mili for LOW and HIGH and compiled it once more. No effect. It still went at the same timings.

Show us what you changed? which part of the Mili for LOW and HIGH?
191  Using Arduino / Project Guidance / Re: arduino diecimila to arduino mega 2560 conversion on: August 07, 2013, 03:44:36 am
Most of the code for Arduino Diecimila are able to used in Arduino Mega 2560 board without change, except some special Pins function which need to change like SPI, PWM, I2C TWI.

http://arduino.cc/en/Reference/SPI
I2C / TWI
http://arduino.cc/en/Reference/Wire

http://arduino.cc/en/Hacking/PinMapping2560

http://arduino.cc/en/Hacking/PinMapping168
192  Using Arduino / Project Guidance / Re: servo not working (I can hear the spinning sound though...) on: July 31, 2013, 05:31:12 pm
You are supply the servo with the USB which only can supply about 500mA, may not able to operate the servo.
You need external supply.
193  Using Arduino / Project Guidance / Re: using GH 311 for a project to detect distances. on: July 30, 2013, 05:12:09 am
The GH311 ultrasonic sensor is not a sensor to measure distance.
How this GH311 works is really just High and Low: High level if an object is within it's detection range, and Low if no object.
http://www.techshopbd.com/uploads/product_document/User%20Guide.pdf
http://forum.arduino.cc/index.php?topic=20867.0
194  Using Arduino / Project Guidance / Re: Nano & external battery problem on: July 29, 2013, 05:28:46 pm
3cells lipo with 10.9V it almost empty, you need yo re-charge it.
195  Using Arduino / Programming Questions / Re: HELP!!!! new to programming on: July 27, 2013, 07:51:51 pm
programming the Arduino as HID USB keyboard
http://forum.arduino.cc/index.php?topic=178810.0
http://forum.arduino.cc/index.php?topic=116644.0
http://hackaday.com/2012/06/29/turning-an-arduino-into-a-usb-keyboard/
Pages: 1 ... 11 12 [13] 14 15 ... 34