rbhelium:Ruby 绑定到 libhelium

时间:2021-06-12 08:13:14
【文件属性】:
文件名称:rbhelium:Ruby 绑定到 libhelium
文件大小:9KB
文件格式:ZIP
更新时间:2021-06-12 08:13:14
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

网友评论