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

Relay Expansion



  • I have post used an example for php, and add for the relay expansion 2 functions in the post:
    https://community.onion.io/topic/39/simple-php-web-gpio-example-switching-leds
    is there a way to get the status of the relays? only when you set the status you get the value back, but I need the status without setting this.



  • @Anco-van-der-Kolk Yes, there is a way to check the status of the relay. We haven't had a chance to implement it into the relay expansion library yet. But you can use I2C to read from the register to find out the current status of the relay. Please take a look at the datasheet for the I/O expander we used on the relay expansion for more details.

    21919e.pdf

    We welcome any pull request if you can add the feature into our relay expansion library šŸ™‚



  • I love to help, but I cannot find how to contribute,
    how to settup the requered envrionment
    I found this:https://github.com/OnionIoT/OpenWRT-Packages/wiki/Setting-Up-the-Cross-Compile-Environment
    but how to program, I see only make files in here.
    I have experience with different program languages but how to start with this I can't find.
    I also looked into the OpenWrt site, but there is only the same documentation to setup a compile environment, but how to contribute and work in this system I don't known
    do you known a link with more documentation for starters, how to setup program environment, and how to start with this.
    I fount the source code of the Relay-ext in here : https://github.com/OnionIoT/i2c-exp-driver/tree/master/src so thats not the problem, my problem is how to start in C.



  • @Anco-van-der-Kolk Hi Anco, we are still working on the documentation to show people how to program on the Omega. Can you tell me what you are interested in building? If there are many people who are also interested in building the same thing, we'll prioritize to have related documentations written first.



  • hi @Boken Lin, I think that it is important now to known how to add things to what there is, to help, to setup, how do you this, maybey you can setup a "standard" linux environment VM, that you can download, and with explanation on how to compile, how to set the compiled files on the onion for test, and if it local works, how to make a pull request.
    I think thats important for your community. I have a lot of hardware, but there is nothing what realy works for me on this moment (in programming perspective)
    and a documentation of the spec-sheats as the pdf you have set in this topic are very handy.

    I known that you working on a lot of things, but if you can explain what you now have, and how you program the onion, I think lot of people can help



  • @Anco-van-der-Kolk The general principle for compiling for the Omega is very simple. You first write your program in C/C++. You will have access to all of the linux system calls, and you will be able to use most libraries out there (except for ones that are very architecture dependent). Once the program works, you need to write a makefile that tells the compiler how to compile the program which you have just written. Then, you will be copying the makefile to the Linux buildroot, and you will be able to compile your program either as a opkg package or directly into the firmware.

    For more information, please take a look at this article: https://wiki.openwrt.org/doc/devel/packages.


Log in to reply
 

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