GithubHelp home page GithubHelp logo

firmata's People

Contributors

gonzih avatar hardbap avatar rickcarlino avatar shokai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

firmata's Issues

No reason to set analog reporting

[This is from an email from Steven Morss]

In board.rb, you have a toggle_pin_reporting() method which turns on/off the reporting for all the analog and digital ports. For the digital ports, this is OK, since they only report on change, so you won't get flooded with events. The analog ports report every sampling interval, which defaults to about 50 times per second. For 16 ports (on the Mega for instance), that can be a lot of samples. More importantly, if the pins are not in analog mode (they can be in digital mode), reading them back only gives back bad data, so they shouldn't be sampled. An easier way to handle things is not to set the report bits on the analog ports at all. In the Arduino C code, when a port is set to analog/digital mode, it's analog report bit is set/cleared automatically (see setPinModeCallback) in the Firmata code. So setting the analog polling bits is done already - no need to do it again

ruby 2.2.0

I saw the the serialport support ruby 2.2.0 in gem version 1.3.1
but firmdata still depend on 1.1.x
Do you have plan to update the dependency of serialport?

Can't connect to arduino board, keeps looping in read_and_process

Here's my setup:

  • Mac (v10.8.2)
  • Arduino Leonardo with Firmata 2.3.2 (tried with 2.3.3, 2.3.4 and 2.3.5 too)

NOTE: I tried to downgrade to 2.2 (as suggested in the README file) but the Arduino app (v1.0.5) threw some errors (a lot of "was not declared in this scope" for TOTAL_PORTS, Firmata, reportPINs, etc) and I wasn't able to do it.

I know Firmata is working in the Arduino because I used a software called firmata_test (http://firmata.org/wiki/Main_Page#Firmata_Test_Program) and the arduino_firmata gem and was able to change the state of the pins.

Here's the code I'm using:

require 'firmata' # v0.1.1

# tried with /dev/tty.usbmodemfa131 too, same results
board = Firmata::Board.new('/dev/cu.usbmodemfa131')

# this does nothing, it gets stuck there, I need to Ctrl-C
board.connect

I put some "puts" in the connect method (https://github.com/hardbap/firmata/blob/v0.1.1/lib/firmata/board.rb#L96), it never executes once('report_version', ->() do and it keeps looping in until connected? forever.

I tried it installing Ubuntu 12.04 in a VirtualBox, same results, even though some linux users have reported this gem works for them.

Any idea?

Implement SERVO_CONFIG message

[This is from an email from Steven Morss]

When I was looking over the Firmata servo code, I noticed there's a SERVO_CONFIG message that allows you to set the max and min angles of the servo. I didn't see the message implemented in your board.rb code.

require 'stringio'

Hi

when call Firmata::Board#connect, it raise error

uninitialized constant Firmata::Board::StringIO (NameError)

## require 'stringio'

this worked.

require 'rubygems'
require 'firmata'
require 'stringio'

arduino = Firmata::Board.new '/dev/tty.usbmodem621'
arduino.connect

Implement SAMPLING_INTERVAL

I didn't see a way to set the Firmata analog sampling Rate. Look in the Firmata code for SAMPLING_INTERVAL (0x7a) to see how it works.

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.