rbhelium:Ruby 绑定到 libhelium

时间:2024-07-02 01:59:54
【文件属性】:

文件名称:rbhelium:Ruby 绑定到 libhelium

文件大小:9KB

文件格式:ZIP

更新时间:2024-07-02 01:59:54

C

铼 Ruby 绑定到 libhelium。 例子 require 'rbhelium' require 'base64' require 'msgpack' Thread . abort_on_exception = true token = Base64 . decode64 ( "HNWl6+nTEHVBXqTVkwPO4w==" ) conn = Helium :: Connection . new ( "r01.sjc.helium.io" ) do | mac , datums | puts "Got data #{ datums } from mac #{ mac } " end puts "subscribing..." status = conn . subscribe ( 0x00212effff003d92 , token ) msg = ( "hello fro


网友评论