Skip to content

Crystal bindings and easy-to-use wrapper classes for TinkerForge components.

License

Notifications You must be signed in to change notification settings

feritarou/tinkerforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tinkerforge

Bindings and easy-to-use wrapper classes to make Crystal code interact with TinkerForge components.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      tinkerforge:
        github: mathalaxy/tinkerforge
        branch: master
  2. Run shards install

Usage

require "tinkerforge"

staple = TF::Staple.new
staple.connect ip_address: "localhost", port: 4223

if staple.connected?
  staple.devices.each do |dev|
    case dev
    when TF::MasterBrick
      puts "Master of the universe!"
    when TF::RotaryPotiBricklet
      puts "Rotary Poti shows #{dev.position}"
    end
  end
end

Development

Currently, there is only support for a very limited set of TF components, because these are what I use in other projects. Supported bricks/bricklets are:

If you would like to add support for other components, please feel free to contribute!

Contributing

  1. Fork it (https://github.com/mathalaxy/tinkerforge/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Docs

GitHub release

Build Status

About

Crystal bindings and easy-to-use wrapper classes for TinkerForge components.

Resources

License

Stars

Watchers

Forks

Packages

No packages published