We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Lirc or Arduino Serial



  • I have been working on a project with my Nerf Lazer Tag guns that involves reading in their codes via IR. This will help me track what is going on with them.

    I have been able to read in these codes via an Arduino and VS1838b IR receiver however now I am stuck trying to figure out what to do next. My choices are:

    1. Try and use Lirc or something else using the Onion GPIO
    2. Keep using the Arduino and send the data to the Onion for parsing

    i am new to all of this and self taught so would appreciate any advice or thoughts about what my next step could be.

    further info would be that I have an arduino but can only communicate with it via serial
    I have the onion omega and expansion dock and would prefer to not have to purchase anything new

    Arduino code is below:

    #include <IRremote.h>
    int input_pin = 2;
    IRrecv irrecv(input_pin);
    decode_results signals;
    void setup()
    {
    Serial.begin(9600);
    irrecv.enableIRIn();
    }
    void loop() {
    if (irrecv.decode(&signals)) {
    if (signals.value == 0x802E6E05) {
    Serial.print("SOLO: ");
    }
    Serial.println(signals.value, HEX);
    irrecv.resume(); // get the next signal
    }
    }



  • @Sorabh-Mishra Having done some work using IR remotes on the Arduino and some work on building packages for the Omega, I have a few comments that may assist you:

    1. As far as I can see, there is a version of LIRC for OpenWRT (which the Omega runs). More information can be found at https://wiki.openwrt.org/doc/hardware/port.gpio/lirc and https://wiki.openwrt.org/doc/howto/lirc-gpioblaster however, the code is not in a form that can readily be used for a standard OpemWRT package build - though it could probably be done with some effort

    2. While you say you have an Arduino and an Omega Expansion dock, you indicate that you would rather not have to purchase anything further. If you do not want to purchase an Arduino Dock for the Omega, it is still possible to connect a standard Arduino to and Omega using I2C. I have done so with an Arduino UNO and with an Arduino Teensy 3.1. The trick is in the code for communicating between the Omega and the Arduino via I2C.
      I have produced some code that assists in doing this - the code and documentation can be found as part of https://github.com/KitBishop/Omega-GPIO-I2C-Arduino using the components libarduino (see https://github.com/KitBishop/Omega-GPIO-I2C-Arduino/tree/master/libarduino) on the Omega side and arduino_omega (see https://github.com/KitBishop/Omega-GPIO-I2C-Arduino/tree/master/arduino_omega) on the Arduino side

    3. If you were prepared to make a small purchase, getting an Omega Arduino Expansion Dock would probably be worthwhile - the same code referenced above can be used for it. The only drawback is that with the Arduino Expansion Dock you loose access to the Omega GPIO pins - something I have overcome with my Omega-Arduino-Expansion board - see https://github.com/KitBishop/Omega-Arduino-Expansion

    4. Finally, it my be worth your while participating in the Omega2 kickstarter (https://www.kickstarter.com/projects/onion/omega2-5-iot-computer-with-wi-fi-powered-by-linux) - a contribution of $20 will get you an Omega2 and Dock of your choice, $24 will get you an Omega2+ and Dock of your choice - the Arduino Dock for the Omega2 is an improvement over the original one in that it also exposes the Omega GPIO pins



  • Thanks ... And Thanks!!!!

    This is exactly the info I was looking for.



Looks like your connection to Community was lost, please wait while we try to reconnect.