Code Monkey home page Code Monkey logo

as3glue's People

Watchers

 avatar

as3glue's Issues

analog inputs or digital inputs don't work now and then

I've programmed a monitor application to set and read inputs - outputs on
the Arduion. Sometimes when I start up the application I cannot
getDigitalData from the inputs. 

This happens more often when a have made an input high ( with a button )
and then startup the Flash application ( and thus reset Firmata with Glue ). 

I added a reset button to do a 'a.requestFirmwareVersion()'. I tried 
resetBoard() before but that doesn't seem to do anything. 

Resetting in that way sometimes solves the issue. However if I do it a few
times, the analog inputs are not sensed anymore ( amount of reset times is
not solid, sometimes after 3 times, sometimes 30 ).  
But I can keep reading the digital inputs. 

I don't get any errors. 

I've included my files. Maybe someone can see directly what goes wrong. 

I use standard firmata version 2.



Original issue reported on code.google.com by [email protected] on 11 Sep 2009 at 8:30

Attachments:

Socket does not get flushed when writing data from Flash to SerialProxy

Problem: In Flash CS3 Professional, calls to writeByte() in Arduino.as only
fill an internal buffer and are not sent to SerialProxy over the TCP socket
right away.

What steps will reproduce the problem?
Here is a short example that toggles an LED based on mouse click/release on
the stage (written in Flash CS3 Professional, all code in Layer 1, Frame 1):

===
import net.eriksjodin.arduino.Arduino;
import net.eriksjodin.arduino.events.ArduinoEvent;
import flash.events.MouseEvent;

var arduino:Arduino = new Arduino("127.0.0.1", 5331);

function onMouseClickEvent(event:MouseEvent):void {
    if(event.buttonDown) {
        arduino.writeDigitalPin(2, Arduino.HIGH);
    }else {
        arduino.writeDigitalPin(2, Arduino.LOW);
    }
}
arduino.setPinMode(2, Arduino.OUTPUT);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseClickEvent);  
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseClickEvent);  
===

What is the expected output? What do you see instead?
Final expected output is LED connected to pin2 toggling on/off with mouse
clicks.  Intermediate expected output is seeing appropriate bytes
tranmitted from SerialProxy to Arduino using a serial port snooper. This
does not happen. Bytes for setPinMode() are sent, (0xF4 0x02 0x01), but
subsequent writeDigitalPin() bytes are not sent.


What version of the product are you using? On what operating system?
latest Glue.zip download, FlashCS3 Professional on Windows Vista.

Solution:
According to Adobe's ActionScript3 documentation for the Socket class, an
explicit call to flush(); forces bytes in the transmit buffer to be
flushed. Calls to flush() should be inserted at the end of all functions
that send data to Arduino/SerialProxy. 

Modified Arduino.as with flush statements is attached (also fixes
disableDigitalPinReporting() issue).


Original issue reported on code.google.com by [email protected] on 12 Feb 2008 at 7:10

Attachments:

standard firmate arduino 017 2.1

Hi,

Glue doesn't seem to work with the standard Firmata 2.1 thats now supplied
with Arduino 17. 

I get "Socket Connected" but then no response. Do you plan to update the
Glue software for 2.1 ?

Any tips how I can make it work for 2.1. 

Original issue reported on code.google.com by [email protected] on 11 Sep 2009 at 11:11

Arduino Mega 2560 Pin Above 13 no response

What steps will reproduce the problem?
1. Arduino Mega 2560 Pin Above 13 no response.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
Arduino Mega 2560, Windows 7 x64 Ultimate

Please provide any additional information below.

I studied AS3Glue and I am trying to connect Arduino Mega 2560 with flash and 
successful. 
Analog Pin success, PWM output 2-13 success.

but I had a problem with the above digital pin 13 (22-53), using 
arduino.writeDigitalPin (22, Arduino.HIGH) no response. 

and it difficult to developt function because very little documentation on its 
website firmata.org 

Thanks in advance.

Sorry for my bad english.

attachment function

        / / FIRMATA2.0 change: have to send a PORT-specific message 
                public function writeDigitalPin (pin: int, mode: int): void 
                { 
                        if (mode == 1) 
                        { 
                                / / Set the bit 
                                _digitalPins | = (mode <<pin); 
                        } 
                        else if (mode == 0) 
                        { 
                                / / Clear the bit 
                                _digitalPins & = ~ (1 <<pin); 
                        } 
                        if (pin <= 7) 
                        { 
                                writeByte (ARD_DIGITAL_MESSAGE + 0); / / PORT0 
                                writeByte (_digitalPins% 128); / / Tx pins 0-6 
                                writeByte ((_digitalPins>> 7) & 1); / / Tx pin 7 
                        } 
                        else 
                        { 
                                writeByte (ARD_DIGITAL_MESSAGE + 1); / / port1 
                                writeByte (_digitalPins>> 8); / / Tx pins 8 .. 13 
                                writeByte (0); 
                        } 
                        flush (); 
                } 

Original issue reported on code.google.com by [email protected] on 30 Sep 2011 at 6:05

Cannot get this to work :(

I have no idea, but i cannot get Firmata to work.
I use Arduino 0011 (maybe version is to blame?)

I had no idea how to get it to compile until one guy suggested on forum:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208542865/1

still i cannot get to compile the standard_firmata.pde from your as3glue.zip!

i could compile some firmata standard from arduino website, but there are
no flash files to test firmata :( your version connects the socket, but no
firmware data or anything. setting pins manually also doesnt work. you
should write a simple installation guide....

Original issue reported on code.google.com by [email protected] on 22 May 2008 at 10:39

Connection established, but no communication

What steps will reproduce the problem?
1. Start serproxy
2. Start standalone monitor

What version of the product are you using? On what operating system?
mac os x 10.6, port 57600, with arduino UNO

Please provide any additional information below.

I have started serproxy while arduino is connected via USB. I have set the 
correct settings in the config file.
Flash standalone monitor seems to make a connection with the proxy server but 
not with the arduino:

I get the message: Connection with Serproxy established. Wait one moment.
This takes forever. the function "getFirmwareVersion" does not return anything.

What can be the problem?

Original issue reported on code.google.com by [email protected] on 13 May 2011 at 2:54

requestFirmwareVersion failing

1. Uploaded Firmata to my Arduino Mega board
2. Configured serproxy with the serial port and baud rate. Says it's waiting 
for clients
3. Loaded the monitor, which connects with Serproxy. Gets stuck on "Wait one 
moment"

requestFirmwareVersion seems to fail. I saw the other similar issue, but I can 
verify I have Firmata running on my board. I tried the standalone 
"firmata_test" application, and that works great.

Running OSX 10.7.2. I also tried the AS2 version, but it also did not work. I'm 
out of ideas, unfortunately. I also made sure I had the serial monitor shut 
down in Arduino, because I read that can sometimes cause issues.

Original issue reported on code.google.com by [email protected] on 21 Nov 2011 at 12:44

Arduino Mega - Pin 39

What steps will reproduce the problem?
1. Set Pin 39 HIGH
2. Attach Voltmeter between Ground and Pin 39
3.

What is the expected output? What do you see instead?

Expect to see 5v, but instead reads 0v


What version of the product are you using? On what operating system?

Arduino Mega 2560, Windows 7 x64

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 10 May 2012 at 8:13

Arduino Uno

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.
Just wanted to point out that I had some problems connecting Flash and Arduino 
together when I was using the Arduino Uno. All these issues were fixed however 
when I used my friend's Arduino Duemilanove. I used the same exact code that I 
had used with the Uno and it ran perfectly on the Duemilanove.

Original issue reported on code.google.com by [email protected] on 10 Feb 2011 at 11:07

Incorrect implementation of disableDigitalPinReporting() in Arduino.as ?

Disabling reporting of digital pins does not work as public function
disableDigitalPinReporting() in Arduino.as has the same implementation as 
public function enableDigitalPinReporting():

writeByte(ARD_REPORT_DIGITAL_PORTS);
writeByte(1);

I believe the second line should be writeByte(0); to disable reporting.
This issue occurs both in Glue.zip and the lastest SVN sources.

Original issue reported on code.google.com by [email protected] on 12 Feb 2008 at 6:11

Have to run program twice after serproxy

What steps will reproduce the problem?
1. After running serproxy.exe on WinXP
2. Launch flash as3 code, it nevers finds the Arduino on the first time
3. Run the program a second time and it finds it

SOLUTION: After trying many things including adding time delays, I used 
the firmata on the Arduino site as opposed to the firmata that came with 
the AS3Glue download files, that fixed the problem

Original issue reported on code.google.com by [email protected] on 7 Dec 2008 at 3:55

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.