Does anyone have any ideas on this? On a raspberry pi, mjpg_streamer and the corresponding DHT library operate gracefully together...
Posts made by James Harding
RE: Webcam Stream and GPIO access at the same time?
Webcam Stream and GPIO access at the same time?
I'm using the DHT11/22/AM2302 Library found here: DHT Lib
It works great when nothing else is running
When I start a webcam stream using:
mjpg_streamer -i "input_uvc.so -d /dev/video0 -y" -o "output_http.so"
suddenly the DHT library will return:
RE: Please Include kmod-video-uvc package in the official repo
I am receiving this same error. Not sure where to go with this.
RE: Bitcoin Clock
Very nice! I wouldn't mind having one of these. I think it would be cool if you made the face of the 'bitcoin' a pie chart, and had different crypto currencies with their own LEDs under each piece of the pie. Then you could use one omega to report a bunch of different crypto currency rates.
How many watts is your laser cutter? That looks like its gotta be pretty powerful, 100 watts?
Use /tmp for application storage, proof of concept
It is no secret that the 16MB flash versions of the onion omega leave a lot to be desired when working with python or node.
On my omega 1, after node is installed I'm left with 1.7MB of space remaining. This is a decent amount if you are building your entire code base. You must be very careful which external packages you choose to use, that 1.7MB can run out really quickly. I know this from experience.
Now to start, I'm not sure if I'm lazy or just bored, one of the two is my excuse for doing this. I've been working on an existing project for the past couple of days and ran out of space on the Omega. Instead of using a USB stick and pivot overlay, I am using /tmp, which I believe is ram space.
Obviously ram gets cleared during a reboot or power cycle, so it's kinda hard to run your code when it doesn't exist.
I have created an init.d script that does a git pull on a repo in to /tmp. After a successful pull, the script also launches the application. User specific settings are kept in /root to maintain some amount of persistence.
While my omega_garage project is running, /tmp usage is at 22% and fairly steady.
Depending on your projects requirements, this may be a viable solution for people that don't want to setup pivot overlay, people that don't have extra USB sticks lying around, or if you are like me and didn't want to pull the ladder out to climb up and insert a USB stick.
I have been running this in my garage for 3 days, there does not seem to be any ill side effects.
Please let me know what you think of this idea, or any potential downfalls to this approach.
RE: The Onion Thermostat
@Costas Costas I am aware that these things already exist for micro controllers that have been out in the wild for longer than the omega. I was referring to a thermostat project that was built specifically for the omega, sorry if i was vague.
I got my Omega2's last week and took a crack at putting my pre-existing thermostat code on to them. Unfortunately, my code base sits at about 21mb, and apparently I didn't buy the omega2 +. So until I get my omega running off of a usb drive I wont be able to do further testing.
RE: The Onion Thermostat
Out of curiosity, does code for all of this exist? or is this simply an idea?
Either way, I have some working code that meets at least some of the requirements above. Also, it could potentially eliminate the need for a screen connected directly to the Omega.
When I get my Omega 2 in the mail, it should be any day, I will try and get the code running on it.
I'm not even sure the project will fit on the Omega.
Other parts that I needed to get my current device working:
- At least 3 relays
- Transistors (NPN) - # of relays you have.
- Rectifier and AC/DC converter (need 5 wires coming from your wall to utilize this setup)
- If you dont have 5 wires, a wall wort to power the Omega.
No guarantees any of this will actually work.
RE: Can't see wireless access point of Omega
A few obvious things to try:
"Hard reset" the omega by holding down the reset button for 10 seconds. Then see if the access point pops up in ur wifi settings.
Ensure that the wifi on your computer is compatible with the wireless network that the omega operates on.
@Brad-Buskey I used magnetic contact sensors to determine if the garage was open or closed. Essentially when one of these sensors comes close to a magnet, its state changes. So my garage doors have a couple of magnets glued to them, and the sensor itself is mounted to the frame of the house where the garage door sits. You see these sensors a lot in a house that has an ADT (or similar) alarm system installed. Here is a link to a sensor that is similar to the one I used: https://www.adafruit.com/products/375
RE: Ruby Crashing?
@Lazar-Demin - It is definitely running out of memory, but if I remember correctly I boiled my code down to just a loop checking the state of the gpio, after of course initializing it the way I wanted to use it.
Hey @Kit-Bishop, Firstly thanks for the code! Yes the code that I tried after running into issues with my own, was yours. My tests might be out of date because im using a version of code that is still using file writing (/sys/class/gpio/gpioX) to export, read value, and change direction. Where as there is a different gpio class that you have that actually writes directly to the register, like fast-gpio. But i think that class is written in C/C++ and does not have a nodejs addon. Please correct me if I am wrong there. I am new to the Omega and microcontrollers in general, and well I can only tell you what I see and know because I don't know anyone else using this platform.
RE: Ruby Crashing?
I had a nodejs test app that had a loop to read from the gpio regularly. This app would only run for a few minutes at most before crashing due to lack of memory. Then I got a hold of a gpio class from a user with the last name "bishop", they had a function that was supposed to listen for a change on an input pin. Their code polled the pin regularly also, and also lead to the app crashing. I never found out why it was crashing, but I do remember pretty much any loop polling an input pin on a regular basis was making my app crash.
I have created a garage door controller using the omega. I then hooked it into my pre-existing raspberry pi control hub. Fun weekend project!
Check out more of the project details and pictures here: hackaday.io
The pi gui showing the garage states and the corresponding buttons. "Main" garage and "Talon" are the two garage doors I have here.
RE: Power Dock Article is Up!
@Anders-Öster It is a wifi enabled remote. I have a raspberry pi that is running LIRC and also has some custom RF stuff going on. This remote sends http posts to that raspberry pi to control things around the house. Most of the omega buttons are setup to run a macro that performs a series of tasks, for example turning everything in the house off.