Show Posts
Pages: 1 ... 11 12 [13] 14 15
181  Forum 2005-2010 (read only) / Syntax & Programs / Re: Best way to "run multiple sketches"? on: July 09, 2010, 09:19:41 am
So unions work with Arduino or its compiler after all. I thought it was said in here Arduino forums that they wont work.
182  Forum 2005-2010 (read only) / Syntax & Programs / Re: Problem with Char() function on: June 02, 2010, 02:57:34 am
Your code works, thanks.

I wonder is the char() help page a little short or misleading.

Here is the whole program if somebody happens to need it.

Code:
char plaa[100];  // don't build more than 99 chars to this!
int val = 0;                    // variable for reading the pin status
char firstStg[8];
void setup()
{
  Serial.begin(9600);
}
void loop()
{
val++;
plaa[0]='\0';
itoa(val, firstStg, 10); // 3rd argument is base, not size (10 is decimal)
strcpy(plaa, "haly=");
strcat(plaa, firstStg);
Serial.println(plaa);
delay(1500);
}
183  Forum 2005-2010 (read only) / Syntax & Programs / Problem with Char() function on: June 01, 2010, 04:50:11 pm
I am playing with strcat and char functions. I am trying to get a result something like " haly=44" in a text variable "plaa".
Code:
int first = 0;    
int  inByte;
char ppp;
void setup()
{
  Serial.begin(9600);
}
void loop()
{
  if (Serial.available() > 0) {
    inByte = Serial.read();
    first++;
    char plaa[]="haly=";
    strcat(plaa," hh");
    ppp=char(first);
    strcat(plaa,ppp);
    Serial.println(plaa);
  }
}
But I get error:
 In function 'void loop()':
error: invalid conversion from 'char' to 'const char*'

In char() documentation in references, there is nothing special mentioned. I have tried many ways to declare the char variable, but nothing seems to help. Is something missing or do I have to make this a full C++ program with libraries and so on.  And eat Arduino's memory.
184  Forum 2005-2010 (read only) / Syntax & Programs / Re: Serial communication within Windows XP to Arduino on: September 16, 2009, 01:40:39 pm
I have never really read FTDI data sheets, but I know there are interesting utilities in FTDI homepage.

This comes late, but did you get your program working
185  Forum 2005-2010 (read only) / Syntax & Programs / Re: Serial communication within Windows XP to Arduino on: September 15, 2009, 02:34:55 pm
Make Arduino to reply with certain code when you send something to it via serial port. If you get the right reply you have the right port. There are more exotics ways (to detect usb serial ports) but this is easy to understand.
186  Forum 2005-2010 (read only) / Interfacing / Re: Strange Serial Port Problems on: September 22, 2009, 01:14:55 pm
I am guessing, but as now one else is helping, how about this:
I had problems with RESET-EN coming active. When I started my pc or VB ide, Arduino changed to programming state. But this was different in two pc's. Maybe this can happen with Macs too.

I had to cut the jumper in RESET-EN track. Now I cant program Arduino before I solder the jumper again, but now Arduino works with the program it has.
187  Forum 2005-2010 (read only) / Interfacing / Re: Ardurino with Visual Basic ? Possible or Not? on: September 15, 2009, 02:37:39 pm
True

And there is a Microsoft forum for visual basic. There are whole examples of this, if you search a little.
http://social.msdn.microsoft.com/Forums/en-US/vblanguage/threads
If you register, you can ask basic questions, at least I could.
188  Forum 2005-2010 (read only) / Interfacing / Re: Ardurino with Visual Basic ? Possible or Not? on: September 14, 2009, 04:36:06 pm
Good to hear. There seems to be differences on pcs.

Here it worked if I connected Arduino when Visual studio was running. Put if I shatdown the pc or if I put the computer to stand by, Arduino stopped working.
189  Forum 2005-2010 (read only) / Interfacing / Re: Ardurino with Visual Basic ? Possible or Not? Yes on: September 14, 2009, 02:01:39 pm
Yes it is possible. But look out for RESET-EN.

When you start Windows or Visual basic there is glicth on DTR pin from Windows. It is connected to Reset-en and puts Arduino in wrong state.

First I made a program with Arduino ide. And put that into Arduino. Then I cut reset-en jumper. Then you can work with visual basic without problems with Arduino. But remember, before a new program can be loaded into Arduino, that jumper must be fixed.
190  Forum 2005-2010 (read only) / Interfacing / Re: How to start USB bus in Arduino board on: April 19, 2009, 12:09:03 pm
I think we can use this board.

There could be some more io but you can't get everything.

For curious:
A friend of mine is going to write some pc programs reading and writing usb com port.  And my job is to handle some hw devices with usb/serial data.

Thanks
191  Forum 2005-2010 (read only) / Interfacing / Re: How to start USB bus in Arduino board on: April 19, 2009, 05:53:18 am
Sorry my delayed reply, other work to be done first.

I think I begin to understand. So, what goes to serial io goes to usb also. The schematic seems to say so.

One more basic question, if the power is cut off, does our program stay in the board.
192  Forum 2005-2010 (read only) / Interfacing / Re: How to start USB bus in Arduino board on: April 17, 2009, 12:12:15 pm
Hi, and thanks for answering.

What I understood is that serial to usb chip shows like a somekind of virtual serial bus in a pc. Nothing more fancy.

But that would be enough for us. In pc we write to a virtual com port and it comes out of Arduino. Is that all what is needed.

I have not actually used the card yet, but I understand, code is also downloaded to the Arduino via usb, don't code and our data get mixed up.
193  Forum 2005-2010 (read only) / Interfacing / How to start USB bus in Arduino board on: April 17, 2009, 10:48:21 am
We are trying to read input pins and send them to usb bus. And read from usb to outputs.

But how to start usb bus. That is when we use serial bus, how to get that into usb. All I see is serial buses.

What code do I need in Arduino?
Do I have to switch some hardware plugs?
194  Forum 2005-2010 (read only) / Troubleshooting / Re: Mouse dual phototransistors on: April 21, 2009, 10:50:10 am
I once checked mouses, and I think optosensor went directly to a chip. I was 0---5V levels.

Your mouse may be different but you may light leaking, like others have said. But are you sure your voltages are right way. It could be low voltage when there is light and high when there is no light. But check leaked light.

195  Forum 2005-2010 (read only) / Development / Not using EAGLE but PADS on: September 17, 2010, 01:40:50 pm
I would like to use Mentor PADS instead of EAGLE. But PADS has no idea of EAGLE files.

Is there someone who has converted those CAD files to other formats.

DXF?

Other ideas?

Thanks
Leif
Pages: 1 ... 11 12 [13] 14 15