Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IR Code issue with ESP8266 #1

Open
manishgdev opened this issue Aug 13, 2018 · 0 comments
Open

IR Code issue with ESP8266 #1

manishgdev opened this issue Aug 13, 2018 · 0 comments

Comments

@manishgdev
Copy link

I am using

  • NodeMCUbESP8266 development board.
  • TSOP1738 IR receiver.
  • MOS v2.4.3
  • Windows 7 64 bit.

I am building the project from a blank template.
Below is the mos.yml

`
libs:
- origin: https://github.com/mongoose-os-libs/ca-bundle
- origin: https://github.com/mongoose-os-libs/rpc-service-config
- origin: https://github.com/mongoose-os-libs/rpc-service-fs
- origin: https://github.com/mongoose-os-libs/rpc-uart
- origin: https://github.com/mongoose-os-libs/wifi
- origin: https://github.com/mongoose-os-libs/mjs # <-- Add Support for mJS engine
- origin: https://github.com/mongoose-os-libs/ir # <-- IR Library

config_schema:
- ["ir", "o", {title: "Custom Settings for IR Receiver"}]
- ["ir.pin", "i", 4, {title: "GPIO pin the IR sensor is attached to"}]
`

Below is the init.js code :-
`
load('api_config.js');
load('api_rpc.js');
load('api_timer.js');
load("api_ir.js");

let pin = Cfg.get('ir.pin');

let ir = IR.Receiver.NEC.create(pin, function(code) {
print("IR", code);
}, null);

RPC.addHandler('IR.Pin', function(args) {
return { msg: "IR Connected to "+pin };
});
`

after building and flashing the project on ESP8266 I am not able to see anything in console on pressing any button from IR remote, though the onboard LED on ESP8266 is blinking on receiving IR signal.

Please suggest if I am missing out something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant