Giter Site home page Giter Site logo

dino's People

Contributors

austinbv avatar dam5s avatar danielmurphy avatar dovadi avatar ejholmes avatar fukayatsu avatar jcasimir avatar jeffsaracco avatar jish avatar kevinolsen avatar mariozaizar avatar nishantmodak avatar parkerl avatar pcasaretto avatar peterhellberg avatar shageman avatar vickash avatar wingfire 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

dino's Issues

Dino can't find board

I'm following the guide at: http://tutorials.jumpstartlab.com/projects/arduino/introducing_arduino.html

but whenever I try and run a ruby script I get the following error:

/Users/Hami/.rvm/gems/ruby-2.0.0-p247-docs/gems/dino-0.11.2/lib/dino/tx_rx/base.rb:52:in handshake': Dino::BoardNotFound (Dino::BoardNotFound) from /Users/Hami/.rvm/gems/ruby-2.0.0-p247-docs/gems/dino-0.11.2/lib/dino/tx_rx/serial.rb:23:inhandshake'
from /Users/Hami/.rvm/gems/ruby-2.0.0-p247-docs/gems/dino-0.11.2/lib/dino/board.rb:13:in handshake' from /Users/Hami/.rvm/gems/ruby-2.0.0-p247-docs/gems/dino-0.11.2/lib/dino/board.rb:9:ininitialize'
from number_guess_game.rb:3:in new' from number_guess_game.rb:3:in

'

Any ideas on what I can do?

OSX: Command not found

Hi!

I have installed the gem using gem install dino and when i try to bootstrap the program, i get the following error: command not found: dino

Im using ruby ruby 1.9.3p392

Hope someone can help :)

Implementing I2C ADXL345 accelerometer with Dino 0.11.3

Hi.
I am implementing ADXL345 I2C Accelerometer from Seeed Studio.
I am seeking for advice from anyone who has figured out how to extend Dino gem and sketch to make them work with an I2C module.

For now I am just trying to read Activity / Inactivity from the ruby script.

Thanks.

Ethernet Shield support

Hi,

I have arduino since few days. I written program using dino which measure humidity of soil.

My goal is to send output data using wifi or ethernet and display it on web page.

So I bought Ethernet shield for Arduino. But don`t know how to program it.

I would like to contribute to your project but for now I dont know how to start :)

Any colleagues clues? :)

๐Ÿ‘ for previous work

Native Execution

Motivation

I was thinking a lot about this project today. I've used Dino a little bit in the past and find it really fun to work with, however at a high level it seems a little backwards. Taking the ability to perform logic away from the Arduino and giving it to another computational unit. The true power of the AVR is it's ability to compute, and a library designed to interface and control the Arduino should leverage this power.

Approach

I am by no means suggesting that Dino be in charge of compiling ruby code into C, this is outside the scope of the project. However I think with some cleaver thought it should be possible to dynamically move some common computational tasks to the Arduino.

Consider the task of matrix multiplication, though the same argument could be made for many tasks. Having a dedicated processing unit grants some benefits in terms of timing, and for some applications this is very helpful. Leaving them on the Arduino could make sense. But how would this be done without injecting or compiling C code into the mix.

Dino Native Function

By developing a C++ class to in effect wrap a function, a user could write his/her own C code to be run natively as individual functions for example matrix_multiply, and then the wrapper class communicates this with Dino upon setup to establish available functions, and exposing them through a ruby class. This is what I feel is a good compromise between attempting to compile ruby into C, and leaving users hanging without a means to control C code running on the Arduino.

Next

An even more complete implementation would be able to wrap full classes in C++ allowing for example, a C++ Matrix class that has defined on it the operator * allowing for lines in C like,

Matrix result = matrix1 * matrix2;

When this whole class is wrapped the previous example could be executed from ruby on the Arduino as,

matrix1 * matrix2  #=> #<Dino::Native::Matrix:0x007ff0048003a8>

This is by no means a small task, and I'm mainly writing this here because I wanted to document my thinking. Thoughts and improvements are more then welcome ๐Ÿ˜„

Where should additional TxRx classes go?

tl;dr

I'm using ser2net to proxy an Arduino's serial connection to a Telnet service on one machine. I want to connect dino running on another machine to that Arduino, so I'm writing a new TxRx class to connect via Telnet. Reading from the Telnet connection was a bit tricky, but I've got it mostly figured out now.

Where should I put this class?

  1. Currently I'm calling it Dino::TxRxTelnet. This seems clunky.

  2. We could make TxRx into a module, so the current TxRx class becomes something like Dino::TxRx::Serial, and the one I'm writing becomes Dino::TxRx::Telnet.

  3. Maybe the best place for this would be in a separate gem?

Thoughts? Also, any ideas on how to write tests for something like this?

Thanks!

What I'm Doing WIth This

I have a somewhat large home automation project in mind, so I need a way to put Arduinos everywhere that won't cost a lot. Ethernet won't always be an option, much less USB. ZigBee shields are pretty expensive, not to mention the security issues. WiFi feels like the right solution, but WiFi shields aren't much cheaper.

What I've settled on is connecting each Arduino to the USB port of a small WiFi router, with Linux installed and running in client mode, connected to my main AP. Then run ser2net to proxy the Arduino serial connection to the network via Telnet, optionally wrapping the whole thing in SSH.

I intend to write this up somewhere when done, but in the meantime, here are some tips for anyone interested in doing something similar:

Basic guide for installing dd-wrt and ser2net on a router:
http://todbot.com/blog/2010/12/16/wifi-for-arduino-with-asus-wl-520gu/

The router I plan on using
http://wiki.openwrt.org/toh/tp-link/tl-wr703n

It's a Chinese-market-only model, so the factory firmware comes in Chinese, but openwrt provides easy instructions for flashing. Once flashed, everything is in your language of choice. Also because of this, you'll have to search for grey market models on eBay or get them shipped in from China, but they're not too hard to find.

These are cheaper than WiFi shields, and tiny, about half the total volume of a Roku player. I can hide them almost anywhere. I haven't taken one apart yet, but on paper it looks like an Arduino Nano should completely fit inside. Mod the case to bring the pins to the outside, and it should be a pretty neat box.

Note:

DON'T use dd-wrt if using this particular router. There won't be enough space left over to install ser2net. Likewise, don't buy the ones on eBay which are pre-flashed with dd-wrt. Instead, buy the stock ones, and use the modified openwrt firmware from here:
http://www.madox.net/blog/projects/tp-link-tl-wr703n/
This also saves you the trouble of installing ser2net, since it's part of the firmware by default.

Also, make sure not to get the WR702N instead of WR703N. The WR703N is blue, while the 702 is green. The 702 doesn't have enough flash memory to install dd-wrt or openwrt in the first place, so you'll be stuck with the factory firmware, which won't work for our purpose.

For Newbies

Installed dine, generated sketch i.e. du.ino
But no blinking.
What's wrong?

Using ruby200, arduino r3

Make auto upload work on Windows and Linux

There are a some simple fixes that we should make before 0.12. I'm creating a separate issue for each one. If you can solve any of these problems and want to contribute, read the explanation of the problem and submit a pull request (against 0.12.0-wip branch) in response to the relevant issue.

Make auto upload work on Windows and Linux

As of Arduino IDE 1.5.2, you can compile and upload for any type of board using the command line. The dino CLI tries to take advantage of this. You can pass the --upload option to upload the code to after compiling.

It compiles for the last type of board you set in the IDE, and uploads to the last serial port used in the IDE. But right now it only works on Macs

DinoCLI::Uploader#executable is responsible for finding the Java executable to use. It's uncommon for the executable to be anywhere besides under /Applications on a Mac, so that's simple, but it can vary for Windows and Linux.

The "standard" paths for Windows (and if there is one for Linux) should be added in with the appropriate checks on RUBY_PLATFORM. Also, if the CLI can't find the Java executable, or a version lower than 1.5.2 is found, it should fail with an error suggesting you open the sketch in the IDE. Or perhaps we could add an option to the CLI to specify the path to the Java executable?

Raspberry Pi + Dino

This isn't exactly an issue. But I working on a project that involves controlling an Arduino that is doing very time sensitive discrete calculations with a RasPi. Has anyone tested Dino with a Raspberry Pi. If not, I'll post my findings here.

Question: Can I Burn the Ruby Script to Arduino Device?

How can I burn my ruby script to the device so it will run automatically the next time it is powered up (not connected to my computer).

I think normally an arduino will start executing the last sketch that was 'uploaded' to it when it is powered on. When I use dino to write my sketches in ruby, it doesn't really seem to do anything. Is there a way to do this in ruby or is it a limitation of this approach?

Button Example Wrong Number of Arguments

Hello,
Nice project! I have the LED example working fine on my Arduino.

The button example, when I run it, gives me this error:
/.rvm/gems/ruby-1.9.3-p194/gems/dino-0.9.1/lib/dino/components/button.rb:14:in 'down': wrong number of arguments (0 for 1) (ArgumentError) from dino/examples/button/button.rb:12:in `

'

Looking at the code, it seems that the .down and .up methods need a callback?
So I tried changing the code to this:

on_data = Proc.new do |data|
    puts "On Data:#{data.to_i}"
end

button.down(on_data) do
  puts "button down"
end

button.up(on_data) do
  puts "button up"
end

and then that runs, but control never gets to the inside of the on_data proc (even though I can see on the serial monitor the pin going from 13::00 to 13:01)

Any ideas what I might be doing wrong?

Thanks!
Dave

Uno board does nothing with Dino

I can run ino scripts on their own but when I try to upload du.ino and run the led.rb example script nothing happens. When I run the script the led blinks a few times then nothing. I'm probably doing something wrong....

Buttons don't work!

Hello!
I apologize for my bad english...
I used your example of a button. But received an error:

root@ubuntu:~/Downloads/ruby# ruby dino_test.rb
Could not find board. Retrying...
Connected to board...
/usr/local/rvm/gems/ruby-2.2.0/gems/dino-0.12.0/lib/dino/components/mixins/callbacks.rb:13:in add_callback': undefined methodsynchronize' for nil:NilClass (NoMethodError)
from /usr/local/rvm/gems/ruby-2.2.0/gems/dino-0.12.0/lib/dino/components/basic/digital_input.rb:27:in on_high' from dino_test.rb:25:in

'

My system configuration:
OS: Ubuntu 14.04, with RVM. Ruby version is 2.2.0.
Arduino - is Mega 2560. This version arduino (on Mega 2560) work only on 0.12.0 version gem.

Analog signals read function in you gem work fine! Anothe function I'm not check.

Read digital output state

Is this possible with dino? I have had my arduino less than 24 hours and went through the 12 chapter book it came with last night, and am trying to integrate it into a rails app today.

I am testing with just one LED across the room right now. I am looking to check the state of the LED (or later on relay). I know that I can set a variable on the state change and read that variable, but if possible I'd like to actually see the state from the hardware. When I try to add_digital_hardware the LED no longer functions, and when I try digital_read, it returns nil no matter what the state. Any help would be appreciated.

Wanting to do something like this.
http://forum.arduino.cc/index.php/topic,41954.0.html

Board Not Found

Had problems connecting to the board from Ubuntu linux:

/var/lib/gems/1.9.1/gems/dino-0.11.2/lib/dino/tx_rx/base.rb:52:in handshake': Dino::BoardNotFound (Dino::BoardNotFound) from /var/lib/gems/1.9.1/gems/dino-0.11.2/lib/dino/tx_rx/serial.rb:23:inhandshake'
from /var/lib/gems/1.9.1/gems/dino-0.11.2/lib/dino/board.rb:13:in handshake' from /var/lib/gems/1.9.1/gems/dino-0.11.2/lib/dino/board.rb:9:ininitialize'

My fix was to add:
def on_linx?; RUBY_PLATFORM.match /linux/; end

and change handshake to:
if on_windows? or on_linux?

Working for me now.

Anyone with a WiFi shield?

There are a some simple fixes that we should make before 0.12. I'm creating a separate issue for each one. If you can solve any of these problems and want to contribute, read the explanation of the problem and submit a pull request in response to the relevant issue.

The code for the WiFi shield is untested on actual hardware.

I'd buy a WiFi shield and test it myself, but I just can't justify it. I have like 10 of these tiny TP-Link routers with OpenWRT on them.

The code compiles and uploads fine. It's based on the ethernet sketch, which I've tested extensively, and the official Arduino WiFi shield examples. I just don't have any hardware to be 100% sure that it works. If you have a WiFi shield and want to try it out:

From the project root, run ./bin/dino help to see how to set options for the WiFi sketch. You should just need to give it your network's SSID and password. It only works with WPA and WPA2, cuz you shouldn't be using WEP anyway. Then run ./bin/dino generate-sketch wifi with your options.

IP is not settable (Arduino issue), so once it's connected you'll have to find its IP on your router or something, and try to connect to it with Dino::TxRx::TCP. See the example at examples/ethernet.rb for a starting point, just swap out your IP. The ethernet sketch and wifi sketch talk to Ruby the same way, it's just some of the Arduino code that's different.

PS: You'll need to add #include <SoftwareSerial.h> at the top of dino_wifi.ino to make it work. That change should be committed as well.

Safely remove hardware

I've noticed if we close a script using dino without calling remove_[digital|analog]_hardware, dino.ino continue sending data over serial connection, even there is no one listening for it. Why not adding a "destructor" to Dino::Board that detach all digital and analog hardware?

Adding support for OneWire

Where and how do you guys envision one adding support for things like this: https://www.sparkfun.com/products/11050?

Would this be useful as part of the library/framework? Otherwise it obviously can just be a component in my existing project.

Also, what are the thoughts of adding more libraries like this to the arduino bootstrap, that can be called from ruby. This would allow us to take advantage of already written arduino libraries.

Pass a block to Sensor#when_received_data

Hey,

I wanted to enable passing a block to Sensor#when_received_data and I was worried about mantaining backwards compatibility, but then I came across this commit ee67d3f .
Should I care about backwards compatibility here?
I actually have both versions ready.

Servo class doesn't work properly

I haven't tested this in a few weeks, but when I tried to use dino to control a servo motor, it failed very badly. I tried with two different 180 degree servos. Inputting target degrees led to inconsistent movements, often resulting in the servo attempting to move out of it's own limitations.

Generated sketches should have a version number

There are a some simple fixes that we should make before 0.12. I'm creating a separate issue for each one. If you can solve any of these problems and want to contribute, read the explanation of the problem and submit a pull request in response to the relevant issue.

Generated sketches should have a version number

Right now the dino generate-sketch command makes files and folders with names like:
dino_serial, which contains dino_serial.ino
dino_etherent, which contains dino_ethernet.ino

When these get generated, they should reflect the version number of the gem that they were generated by, and hence, is compatible with. Something more like:

dino-serial_0.11.3 for the folder name and dino-serial_0.11.3.ino for the sketch file. Doesn't have to be exactly that. Whatever looks good and is compatible with most filesystems.

The name of the folder and the sketch (minus the .ino extension) need to match exactly or the Arduino IDE complains.

The library filenames should NOT be versioned in this way, but adding the version info as a comment at the top of these files is probably a good idea.

DinoCLI::Generator is where the files get there names and Dino::VERSION stores the current version number.

Analog Pins on Windows

I'm trying to run this code:

http://tutorials.jumpstartlab.com/codenow/nightlight.rb

Based on the second project I wrote up in this tutorial:

http://tutorials.jumpstartlab.com/codenow/introducing_arduino.html

The first project is working fine. This one appears unable to read from the analog pin. Ideas I've tried:

  • Changing the baud rate in the windows device settings
  • Reading from the pin in IRB

I'm not getting anywhere. The on_read callback is never getting triggered. I presume the board is not able to read the pin.

One thing that stood out -- on OS X I have no problem using ctrl-c to break execution while the code runs. On windows, though, it just "hangs." No keyboard input can break the running program. This has me thinking that there's some difference in either how sleep is handled or how the Thread is spun off for the device.

I'm brain dead right now. I hope to look at this again in the morning. I know others probably don't have access to Windows -- but I'd love some ideas of places to investigate.

Should I keep the connection ?

Hi, This is a question more than an issue.
I'm new in using the UNO with ruby, I did write code and it's working but when I disconnect the uno I lose everything!

Do I need to keep the connection between the Uno and the computer?
How can I upload the ruby code, disconnect the uno and still have the code running on the uno?

Add a CONTRIBUTING.md file

There are a some simple fixes that we should make before 0.12. I'm creating a separate issue for each one. If you can solve any of these problems and want to contribute, read the explanation of the problem and submit a pull request in response to the relevant issue.

Add a CONTRIBUTING.md file

See #55 (comment) where I explain to @X-Mort-X how to use dino from source. This should be included in CONTRIBUTING.md.

Also it should request that you submit pull requests against *-wip branches instead of master. Inclusion of tests. Add examples when writing code for new components, etc.

I'm probably leaving stuff out, so anything else of relevance can be discussed in this issue.

Also, Bootstrap's CONTRIBUTING.md looks like a good structure to follow: https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md

Using dino over bluetooth with Seeed Bluetooth Shield?

Hi.

Has anyone figured out how to use dino using Seeed Bluetooth Shield?

I tried replacing dino setup() function with

void setup() {
    Serial.begin(38400);                           // Set BluetoothBee BaudRate to default baud rate 38400
    Serial.print("\r\n+STWMOD=0\r\n");             // set the bluetooth work in slave mode
    Serial.print("\r\n+STNA=SeeedBTSlave\r\n");    // set the bluetooth name as "SeeedBTSlave"
    Serial.print("\r\n+STOAUT=1\r\n");             // Permit Paired device to connect me
    Serial.print("\r\n+STAUTO=1\r\n");             // Auto-connection should be forbidden here
    delay(2000);                                   // This delay is required.
    Serial.print("\r\n+INQ=1\r\n");                // make the slave bluetooth inquirable
    delay(2000);                                   // This delay is required.
    Serial.flush();
    dino.setupWrite(writeCallback);
}

Here is my ruby script.

    board = Dino::Board.new(Dino::TxRx::Serial.new({device: "/dev/cu.SeeedBTSlave-DevB", baud: 38400}))
    led = Dino::Components::Led.new(pin: 8, board: board)
    led.on

I can pair the Arduino with Mac OS X but I keep getting "Board not found" error.

Handle components that read and write.

For example an LED should be able to ask about it's current state.

This is a kinda interesting problem because when you add_digital_hardware it sets the pin mode to in, that logic should be updated when it needs to be only.

More investigation is needed.

Latest .ino file not verified: Invalid initialization of reference of type 'HardwareSerial&'

Hi there,

I just installed dino on a new app, ran dino sketch serial and opened the dino_serial.ino in the Arduino IDE. It is failing to compile: invalid initialization of reference of type 'HardwareSerial&' from expression of type 'usb_serial_class.

The full error message stack:

var/folders/rd/24281_h15x5dxnd5c__z25jh0000gp/T/build6615047894839573031.tmp/DHT.cpp: In member function 'void DHT::readSensor()':
/var/folders/rd/24281_h15x5dxnd5c__z25jh0000gp/T/build6615047894839573031.tmp/DHT.cpp:165:17: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]
data <<= 1;
^
/var/folders/rd/24281_h15x5dxnd5c__z25jh0000gp/T/build6615047894839573031.tmp/DHT.cpp:147:8: warning: 'rawTemperature' may be used uninitialized in this function [-Wmaybe-uninitialized]
word rawTemperature;
^
/var/folders/rd/24281_h15x5dxnd5c__z25jh0000gp/T/build6615047894839573031.tmp/DHT.cpp:198:28: warning: 'rawHumidity' may be used uninitialized in this function [-Wmaybe-uninitialized]
humidity = rawHumidity * 0.1;
^
/var/folders/rd/24281_h15x5dxnd5c__z25jh0000gp/T/build6615047894839573031.tmp/Dino.cpp: In member function 'void Dino::writeResponse()':
/var/folders/rd/24281_h15x5dxnd5c__z25jh0000gp/T/build6615047894839573031.tmp/Dino.cpp:120:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
_writeCallback("\n");
^
/var/folders/rd/24281_h15x5dxnd5c__z25jh0000gp/T/build6615047894839573031.tmp/Dino.cpp: In member function 'void Dino::ds18Read()':
/var/folders/rd/24281_h15x5dxnd5c__z25jh0000gp/T/build6615047894839573031.tmp/Dino.cpp:355:8: warning: unused variable 'present' [-Wunused-variable]
byte present = ds.reset();
^
dino_serial:21: error: invalid initialization of reference of type 'HardwareSerial&' from expression of type 'usb_serial_class'
invalid initialization of reference of type 'HardwareSerial&' from expression of type 'usb_serial_class'

Environment:
Rails 4.2.1
Ruby 2.0.0p645
Teensy 3.1 w/Teensyduino 1.22
Arduino 1.6.3

Note that sketches I've created in Arduino IDE itself do work properly when uploaded to the device.

Leonardo board error

dino_serial:12: error: conversion from 'Serial_' to non-scalar type 'HardwareSerial' requested

I just got in my leonardo boards and wanted to see if dino worked well on them. I was able to change serial to Serial1 and get that error to go away, but I still get an error when trying to connect to the board.

HardwareSerial serial = Serial1;
irb
2.0.0-p195 :001 > require 'dino'
 => true 
2.0.0-p195 :002 > board = Dino::Board.new(Dino::TxRx::Serial.new)
Dino::BoardNotFound: Dino::BoardNotFound
    from ~/.rvm/gems/ruby-2.0.0-p195/gems/dino-0.12.0/lib/dino/tx_rx/base.rb:46:in `handshake'
    from ~/.rvm/gems/ruby-2.0.0-p195/gems/dino-0.12.0/lib/dino/board.rb:11:in `initialize'
    from (irb):2:in `new'
    from (irb):2
    from ~/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>'

Quick Build Script

See gist here: https://gist.github.com/vickash/5689468

Should help those of us working on the Arduino side code by easing the compile + upload process and letting us avoid the IDE and use any text editor. Has the Mac executable hard-coded into it, but should be easy to adapt for Linux.

Board Not Found

After having followed the steps.. I just keep getting

/dino/lib/dino/tx_rx/usb_serial.rb:17:in `io': Dino::BoardNotFound (Dino::BoardNotFound)
    from /home/nm/projects/dino/lib/dino/tx_rx/usb_serial.rb:44:in `write'
    from /home/nm/projects/dino/lib/dino/board.rb:47:in `write'
    from /home/nm/projects/dino/lib/dino/board.rb:111:in `send_clearing_bytes'
    from /home/nm/projects/dino/lib/dino/board.rb:9:in `initialize'
    from examples/led/led.rb:8:in `new'
    from examples/led/led.rb:8:in `<main>'

Add support for Sound/Piezo/Buzzer

Just watched the Ruby Con talk Austin gave. Awesome :)

I have a piezo/sound/buzzer I'd like to add support for.
Looks like I need to modify the Dino.cpp and Dino.h files though to call functions not currently supported by Dino.

tone() and noTone() are what I need to call on the Arduino.
Need some assistance to make this happen though.

I've made what looks to be the right-sort-of changes to the cpp and h files, but I don't know if Dino can support tone(pin, feq, duration) in it's current form.

Program stops on board att

I installed Dino yesterday and I'm having problems trying to execute the simple blinking program.
I realized that the program 'gets stuck' on the board = Dino::Board.new(Dino::TxRx::Serial.new)line.
(I also tried board = Dino::Board.new(Dino::TxRx.new))

I kept regenerating and reuploading the sketches and a few minutes ago I got the Board Not Found error. Then I reinstalled Dino and I'm back to the same situation: the program is running forever and is not logging a thing.

Neopixel

I want to be able to control my neopixel stick using dino, but I really don't know how to get started on it.

https://github.com/adafruit/Adafruit_NeoPixel

I don't fully understand how my arduino is using this library. I'm only using one pin to control it. It's easy to code for in arduino using the library, but I have no idea how to merge it with dino.

http://www.youtube.com/watch?v=sL0p3a0yB6k

Any ideas? I'd be willing to setup a remote connection so that someone could play with it if need be. Or if you're in the states I could order you a stick?

http://www.adafruit.com/products/1426

Connect to servo without setting position

The after_initialize sets the servo position to the passed in option or 0. However I would like to have my servo stay in the same position upon connection and reconnection. Is there a way to do this?

I am willing to write the code to extend the servo to do this but was wondering if there is a particular approach you would like me to take.

One way may be something like this

     def after_initialize(options={})
        set_pin_mode(:out)
        board.servo_toggle(pin, 1)
        unless options[:maintain_position]
          self.position = options[:position] || 0
        end
      end

Any guidance here would be great

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.