Loading...
  Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Programming Questions / Why this sketch is not working? on: June 07, 2013, 08:24:35 am
Hi There!  I want to scroll the text on the LCD.  I am using the below sketch but its giving error "cannot convert 'String' to 'char*' for argument '1' to 'void marquee(char*)". What I have to do to get this worked?

Thanks.

Code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int numRows = 2;
const int numCols = 16;
String stringOne;
String stringTwo;
String stringThree;
void setup()
{
  // set up the LCD's number of columns and rows:
  lcd.begin(numCols, numRows);
}
void loop()
{

  stringOne = "HELLO WORLD!!";
  stringTwo = "hello world!!";
  stringThree = stringOne + stringTwo;
  marquee(stringThree);
  delay(1000);
  lcd.clear();
}

// this function uses scrolling to display a message up to 32 bytes long
void marquee(char  *text )
{
  int length = strlen(text); // the number of characters in the text
  if(length < numCols)
    lcd.print(text);
  else
  {
    int pos;
    for( pos = 0; pos < numCols; pos++)
      lcd.print(text[pos]);
    delay(1000); // allow time to read the first line before scrolling
    while(pos < length)
    {
      lcd.scrollDisplayLeft();
      lcd.print(text[pos]);
      pos = pos + 1;
      delay(300);
    }
  }
}
2  Using Arduino / Programming Questions / Bootloader delay on: May 28, 2013, 09:57:45 am
Hi There!

I have moved my project to standalone board of Atmega 8.  During this process, I had to load boot loader on the atmega 8.  Everything works as expected except the 10 seconds delay at start up when powered on.   Is there a way to minimize this delay?  I don’t need in system programming option.  While googleing I have found opti boot may fix this issue, is that an option?

Thanks in advance,
3  Using Arduino / General Electronics / Re: BT-138 and inductive loads on: April 25, 2013, 01:08:42 am
No.. No.. What I meant was the RC  circuit ( .01 mfd and 39R in series) in the link you mentioned is a snubber. So you no need to add anything if you are using the same circuit.
4  Using Arduino / General Electronics / Re: BT-138 and inductive loads on: April 25, 2013, 12:19:14 am
You need to add a snubber circuit if you dealing with inductive load.  The resister and capacitor in series across the load in the first circuit is nothing but the RC snubber.
5  Using Arduino / General Electronics / Re: How to calculate AC Watts on: April 05, 2013, 03:27:52 pm
Thank you!
6  Using Arduino / General Electronics / Re: How to calculate AC Watts on: April 05, 2013, 03:14:45 pm
Thank you very much for your quick reply.  So a 150 Watt 220 V to 110 V converter is best bet?

7  Using Arduino / General Electronics / How to calculate AC Watts on: April 05, 2013, 02:58:29 pm
Hi There!

I need to buy an 220V AC to 110V AC converter for my Xbox adapter. Only DC power rating is mentioned on the Adapter as 12 V DC @ 9.6 Amps and 5V DC @ 1Amp.  If I calculate P=VI, total power is coming to 120 Watts at DC.  Will DC wattage is equal to wattage at AC?  What wattage of converter I need to buy to hook up this adapter?

Thanks in Advance
8  Using Arduino / General Electronics / Re: Triac vs Relay on: March 16, 2013, 01:40:28 pm
Thank you dc42.  After doing some research on internet, I too realized that snubber circuits may not be useful in suppressing the arc totally.  So I am left out with the option building my own SSR.  Good news is there a snubberless version available in BTA16 Triac series for inductive loads.
9  Using Arduino / General Electronics / Re: Reset Switch on: March 13, 2013, 08:38:22 am
Thank you!..  I got my question answered.
10  Using Arduino / General Electronics / Re: Reset Switch on: March 13, 2013, 08:31:01 am
OK thanks.  I understand I need to keep the reset pin to high using a pull up resister.  So the question is, power recycling the board is not going to reset?  Power recycling is not just like reset? Just curious to know. 
11  Using Arduino / General Electronics / Reset Switch on: March 13, 2013, 07:21:13 am
On standalone projects, is reset switch necessary? Is there any difference between power recycle and reset?
12  Using Arduino / General Electronics / Re: Triac vs Relay on: March 13, 2013, 02:40:46 am
Thanks all for your responses.  I have decided to go with 10 Amps relay.  For the snubber network, If have one capacitor of 10nf/680V and one resistor 39R in series across the relay switching terminals, is that sufficient?
13  Using Arduino / General Electronics / Triac vs Relay on: March 12, 2013, 03:06:28 pm
Hi There!

I want to control (on and off) 1.5 HP, 220VAC motor from Arduino.  I am thinking of controlling the motor by building a solid state relay using MOC 3021 and triac BTA16.  Is this the best approach? or using a relay is the simple and better option?  Need to know any advantages and disadvantages of both the approaches.  Any suggestions are welcome.  Thanks in advance.
14  Using Arduino / Sensors / Re: Pressure Sensor on: February 13, 2013, 01:08:13 am
Thank you!

@Krodal

Yes,  The pressure sensor is underneath the black rubber and there are three pins to connect.  Its similar to DN-S18 in the link you mentioned
15  Using Arduino / Sensors / Pressure Sensor on: February 12, 2013, 12:36:13 pm
Hi There!

I am looking for a pressure sensor to measure the continuous water level in a tank.  The area where I live it’s difficult to get the pressure sensors.  Fortunately I could spot a guy who sells the washing machine spares.  He has a sensor(picture attached) but he has no clue how it should be fixed, neither me.  My understanding is,  it will output 0 to 5V based on the pressure, I can connect the output to arduino analog pin and measure the water level in the tank.  But the question is,  usually how its fixed in the washing machines? Will water goes in the tube attached to this sensor, or some other mechanism like air bag used to measures the air pressure?  Any or all suggestions are welcome.  Thanks in Advance.
Pages: [1] 2 3 4