@Scott-W-Wood I can only reply in connection with the original Omega and original Arduino Dock - I have not yet received my Omega2 and new Arduino Dock R2 - there is no documentation I can find on the latest versions that would allow me to respond definitively on them, though the photos shown on https://www.indiegogo.com/projects/omega2-5-linux-computer-with-wi-fi-made-for-iot#/ for the Arduino Dock R2 show that there are some differences and I don't know how significant these differences are.
https://github.com/omcaree/node-serialgps would be even better, if you dont want to read the data from the serial yourself. Unfortunately the dependency "serialport" needs compilation, which is not possible without npm.
I think the problem is that apache is running as nobody and the relay-exp is only accessible from root.
Changing apache to run as root is not possible without rebuild...
... Apache has not been designed to serve pages whil running as root. There are known race conditions that will allow any local user to read any file on the system. If you still desire to serve pages as root then add -DBIG_SECURITY_HOLE to the CFLAGS env variable and then rebuild the server.
The input to the PowerSwitch Tail is an optocoupler, with an input current range of about 3 - 30mA at a forward voltage of about 1.4V in the "ON" state. The modifications I have proposed will allow the Omega (whose I/O circuitry runs off a 2.5V supply) to provide at least 3mA when ON. If a 5V input is used instead of the Omega, the input current (with these modifications) becomes about 15mA, which is still well within the operating range for the PowerSwitch Tail's input current.
Sorry - the list of usable pins was supposed to read "0, 1, 6, 7, 13, 14, 18, 19, 23, 26". These are also the only pins clickable in the Console's GPIO Tool, along with pins 8 and 9, which while clickable they resort to Direction: Output and - respectively - Value: 1 and Value 0. Are schematics for these modules available anywhere for the community? These would help immensely!
This question might be silly but I am sure I'm not the only one who wants to get sure before destroying something
I'd like to use the relay expansion to switch on/off a light bulb (for testing purposes). Therefore I would cut the electricity cable of a lamp into two and put the ends in the two sockets of a relay on the expansion.
Is the relay expansion designed to handle this amount of power (230V, 50Hz)? Is there anything I need to know to take care of before I start?
This is a very good question. And the answer is that most relay expansion boards are not designed so that they safely can be connected to the mains voltage without causing a safety hazard that could result in electric shock or a fire.
The reason in most cases is that the circuit board is made with too short distances between low voltage parts and mains voltage traces. To save money, most of the relay boards use relays that were never intended for this type of use. The relay may have been designed to be used where the low voltage circuitry is grounded, so that if a connection between live wiring and the circuitry that controls the coil, the low voltage circuitry would not end up at a hazardous voltage.
But with micro controllers for hobby use it is most of the time so that the circuitry is not connected to ground, and even if it was (through USB cable ground) the ground connection is not strong enough that it will be safe. So the relay boards that are going to be used for controlling mains voltage will look different. there will be large distances between AC power traces and the rest of the circuitry. THe relays will be different and a bit larger, with much longer creepage distances and with coil pins far away from power pins.
Still, most relay board manufacturers list the characteristics of the relay, not understanding that the circit board design must meet electical safety requirments to be safe. They invite users to connect the relay board to the mains voltage but their product is unsafe.
Another thing to remember is that there must be a fuse in series with the load, and the fuse rating must be low enough that if there is an overload the fuse will open before the circuit board traces or the relay contacts are damaged. A relay with 2A contacts, I would use max 1.5A fuse. The mains outlet may have 10A or even higher rating.
@Benjamin-Rau I have just had a play with my Omega and pins 13 and 14 when set as input both operate equally and as expected.
Unless there is a problem with my Omega, there are a few things you could check (forgive me if these are obvious to you or you have already done them ):
Are you sure that the circuitry is the same for 13 and 14?
Is the code used to access each of 13 and 14 the same?
Is there anything else that is using one pin but not the other?
If you are using mechanical switches to control the pins, do you have a suitable pull-up/pull-down resistor to pull the pins to the appropriate state when the switch is open?
If you are using mechanical switches, do you have suitable de-bounce circuitry to account for noise? A capacitor in parallel with the switch (along with the use of pull-up/pull-down resistors) should handle this