Bit Trade One IR Remocon control module for mruby
Switch branches/tags
Nothing to show
Clone or download
hiroki hiroki
hiroki and hiroki fix value
Latest commit a9b4d13 Jul 24, 2018
Permalink
Failed to load latest commit information.
mrblib first commit Sep 19, 2016
src fix value Jul 24, 2018
test first commit Sep 19, 2016
.travis.yml first commit Sep 19, 2016
.travis_build_config.rb first commit Sep 19, 2016
LICENSE first commit Sep 19, 2016
README.md add version method Jul 24, 2018
mrbgem.rake add comment and clean up Sep 20, 2016
mruby-remocon.gem first commit Sep 19, 2016

README.md

mruby-remocon Build Status

Remocon class

Bit Trade One IR Remocon controller

http://bit-trade-one.co.jp/BTOpicture/Products/005-RS/

This module make at FreeBSD and Mac OS X. May be work Linux.

This module use as follow repositorie source code.

https://github.com/kjmkznr/bto_ir_cmd

Mac OS X support is as follow library code.

https://github.com/signal11/hidapi

send method Array parameter

offset note
1 Byte hi 4 bit length per 4 bit
1 Byte lo 4 bit signal type. (1 AEHA, 2 NEC, 3 SONY, 4 MITSUBISHI)
2- Byte data

Sample data Sony CD Player Play

[0x33, 0x4d, 0x10]

length is 3 * 4 = 12 bit : type is SONY : data is 0x4d1

Data byte bit is revers from naitive data. Because of populer this format.

install by mrbgems

  • add conf.gem line to build_config.rb
MRuby::Build.new do |conf|

    # ... (snip) ...

    conf.gem :github => 'yamori813/mruby-remocon'
end

example

# http://a-desk.jp/modules/forum_hobby/index.php?cat_id=8

# Sony CD Player Play
play = [0x33, 0x4d, 0x10]
# Sony CD Player Stop
stop = [0x33, 0x1d, 0x10]

t = Remocon.new()

if t.open then

  t.send(play)
  usleep 45*1000
  t.send(play)

  sleep 10

  t.send(stop)
  usleep 45*1000
  t.send(stop)
end

License

under the MIT License:

  • see LICENSE file

Todo

  • error handling
  • long data support
  • receive support