Show Posts
Pages: 1 ... 36 37 [38] 39 40 ... 67
556  Using Arduino / Programming Questions / Re: correct way to get firmata running? on: December 25, 2012, 08:57:53 am
Firmata speaks a binary protocol, hence the gibberish.

If you want a command interpreter on your Arduino that talks a language humans can read, give Bitlash a try:

You can control Bitlash from the PC over the serial port, just like firmata.  For an example of how to do this, there's Bitlash Commander:

You can also control Bitlash from Processing by sending commands over the serial port.

Good luck with your project.

557  Using Arduino / Project Guidance / Re: Controlling a computer (internet browser) with Arduino on: December 25, 2012, 08:20:39 am
Bitlash Commander could do what you want, with Bitlash on the Arduino:

Commander is a little web server app that runs on your pc and talks to Arduino over the USB serial port.  You make web pages with control panels that talk to the Arduino using Bitlash to control it.  There's a little graphical editor or, if you know html and javascript, it's easy to use the control library to design your own pages.

The Arduino can send update messages targetted to a specific control.  You could make the control open another web page when a certain value arrives, with a little javascript.


Edit: fixed image url.
558  Using Arduino / Project Guidance / Re: HTML Server Web Pin Control on: December 24, 2012, 10:23:37 am
If the lines were fixed-length you could use lseek() to set the file pointer to a computed length and write a fixed-length record there.

Real program lines haven't been fixed-length since the Hollerith days, so the practical answer is "not really", since you don't know how long the line you are overwriting is.


559  International / EspaƱol / Re: concatenar numeros on: December 24, 2012, 07:39:45 am
    numero = numero * 10 + nuevo_digit;

560  Using Arduino / Microcontrollers / Re: attiny85 serial monitor on: December 22, 2012, 06:34:14 am
There is a limit on the operating clock speed based on VCC.  Higher speeds are not possible at lower voltages.  There's a chart in the datasheet, I believe.

Anyway, it's possible you experimentally determined the limit.  I'd be curious to know what speed are you running the '85.

561  Using Arduino / Project Guidance / Re: Is there a way to send more than 64 characters at a time through serial? on: December 21, 2012, 05:34:37 pm
Well, you can read about circular buffers with a little searching.  But basically it's the same thing the Serial object is doing for you: you keep an array or buffer, and there is a head and a tail pointer.  You push things (serial characters) in at the head and pull them out at the tail as the consuming process requires them.  There is sample code around line 165 at that URL I pasted above.

You would pump characters from the serial buffer into this new buffer, and play morse out the other end of the new buffer.

It may be easier to increase the size of the Serial buffer.  Or implement some flow control between the sending computer and the Arduino, perhaps like send-a-line-and-wait-for-prompt.  That's how Bitlash does it.  The circular buffer is there so that Bitlash can do other things while the Morse plays out in the background.

562  Using Arduino / Project Guidance / Re: Is there a way to send more than 64 characters at a time through serial? on: December 21, 2012, 05:16:43 pm
You might make your own circular buffer and "decant" the serial input buffer into yours.  It can be any size you like.

There's an example here, also with morse output:

563  Using Arduino / Programming Questions / Re: Does this work on: December 21, 2012, 06:48:20 am
Send the device something it actually expects, and check the return for the predicted value.  Studying the data sheet for the device is the first step.

564  Using Arduino / Interfacing w/ Software on the Computer / Re: PHP fread arduino serial com doesn't work. PLEASE Help!!! on: December 20, 2012, 01:10:51 pm
You are probably a victim of the bootloader timeout.

Opening the serial port resets the arduino.  There is a two second period after you open the port from PHP during which your program is not yet running.  If you send data during this window, the bootloader eats it.

In the PHP code it appears you write to the serial port immediately after opening it.  Try waiting two seconds after the open and see if it helps.


565  Using Arduino / Programming Questions / Re: Finding array's linear part on: December 20, 2012, 11:12:20 am
If it's linear, it doesn't matter how many elements you use, right?

I don't think you want to get into calculating piecewise linear regressions of all contiguous subsets of the data, but that's the hammer you'd use in a formal statistical analysis.

Often the central tendency tells you enough to get the job done.  Speaking of which, what is this for?  It might help understand your requirements better.

566  Using Arduino / Programming Questions / Re: Finding array's linear part on: December 20, 2012, 10:36:21 am
You're going to need to look at a lot of data from your sensor to figure out the right answer.  But why not just use the middle three elements of the sorted array as a first guess?

567  Using Arduino / Programming Questions / Re: Pin 10 is HIGH. WHY? on: December 20, 2012, 09:55:28 am
The fast fix is three characters: // right before that digitalWrite, followed by Upload.

Patch the SPI library and you're done.  It is not written in stone, nor even in the datasheet, that pin 10 must be used as the slave select, provided that it is initialized as an output, which it safely is.

568  Using Arduino / Interfacing w/ Software on the Computer / Re: 2 way serial arduino to vb6 on: December 20, 2012, 08:11:12 am
Have we ruled out a problem on the sending side?

Opening the serial port from the PC side resets the arduino.  The Arduino isn't running your program for a couple seconds after reset.  So, if you open the port and write to it right away / without a delay, some  of the sent output gets dropped on the floor (by the bootloader).

If you don't delay after opening the port, it might be worth a try.  And could you post your whole sending-side code?

569  Using Arduino / Project Guidance / Re: Sending Arduino data over to another pc on: December 20, 2012, 07:35:13 am
It might be worth taking a look at Bitlash Commander, at least for the architecture:

Commander runs a little web server on your PC that also talks to the Arduino through the usb serial link.  You can build web based control panels for Arduino and control them from a PC on your network.

570  Using Arduino / General Electronics / Re: ADC on: December 20, 2012, 06:32:43 am
"Board on fire", code 0x15.

Seriously: negative voltages on the inputs can damage your Arduino.  There are techniques to transform the voltage into something Arduino can use; search the forums for "level shifting" for one approach.

Pages: 1 ... 36 37 [38] 39 40 ... 67