Go to advanced search

by vvarrior
Mon Oct 22, 2018 8:08 pm
Forum: Troubleshooting
Topic: Float sensor changes with mode up, but not down
Replies: 5
Views: 245

Re: Float sensor changes with mode up, but not down

Nope, worked perfect. Changed wires (although I don't think that was a necessary step) and moved the float GND wire to 3.3v - gpio mode down started working. I love when simple fixes work - and there was also learning. Down circuits need positive voltage while up circuits need GND. Makes sense. The ...
by vvarrior
Mon Oct 22, 2018 7:46 pm
Forum: Troubleshooting
Topic: Float sensor changes with mode up, but not down
Replies: 5
Views: 245

Re: Float sensor changes with mode up, but not down

Actually, it looks like changing wires isn't enough. I will need to move the GPIO pin wire to the other wire on the float sensor, then instead of connecting to ground, I'll need to connect to 3.3v. Ok, I'll make that change and see what happens.
by vvarrior
Mon Oct 22, 2018 7:44 pm
Forum: Troubleshooting
Topic: Float sensor changes with mode up, but not down
Replies: 5
Views: 245

Re: Float sensor changes with mode up, but not down

It seems that all I need to do is swap the wires on the switch no? Easy enough because it's connected to the gpio with jst connectors, however, when I do that, the result is the same. I'll take a look at the schematics on the git link you sent and verify.

Thanks for your quick reply earlier.
by vvarrior
Mon Oct 22, 2018 6:31 pm
Forum: Troubleshooting
Topic: Float sensor changes with mode up, but not down
Replies: 5
Views: 245

Float sensor changes with mode up, but not down

Subject pretty much describes it. I have a float sensor that when set to gpio mode up, will be 0 when closed and 1 when open. When I change the mode to down, it should be 1 when closed and 0 when open but it just stays on 0 whether its open or closed. Float sensor is outside of tank during this test...
by vvarrior
Thu Sep 06, 2018 2:03 pm
Forum: Beginners
Topic: RuntimeWarning GPIO channel is already setup - Way to catch it?
Replies: 4
Views: 332

Re: RuntimeWarning GPIO channel is already setup - Way to catch it?

That's what got me into this mess... Had i spent some more figuring out why the error came up and under which conditions I would have realized the coding should have been different. This code isn't exact and the results are from memory after a long night of coding, so forgive any errors. import RPi....
by vvarrior
Thu Sep 06, 2018 12:34 pm
Forum: Beginners
Topic: RuntimeWarning GPIO channel is already setup - Way to catch it?
Replies: 4
Views: 332

Re: RuntimeWarning GPIO channel is already setup - Way to catch it?

I recently discovered the importance of cleaning up GPIO pins used in scripts and am still testing it's significance. I realize it resets pins and the docs I've read indicate it resets pin modes back to input only but doesn't reset values (high/low). Just as a side note, I'm curious if it A) resets ...
by vvarrior
Thu Sep 06, 2018 8:13 am
Forum: Beginners
Topic: RuntimeWarning GPIO channel is already setup - Way to catch it?
Replies: 4
Views: 332

RuntimeWarning GPIO channel is already setup - Way to catch it?

except RuntimeWarning doesn't catch the GPIO error that's printed when trying to setup a channel that is already setup. While this warning doesn't interrupt a script, I still want to catch it and process accordingly. My search has resulted in numpy RuntimeWarning catches but it doesn't look like the...
by vvarrior
Sat Sep 01, 2018 2:36 pm
Forum: General discussion
Topic: If RPi gets unplugged, sometimes it stalls during boot
Replies: 7
Views: 558

Re: If RPi gets unplugged, sometimes it stalls during boot

I didn't realize the risk involved with pulling a plug. I don't intend on pulling the plug ever or doing any sort of scheduled reboots, etc but I'm in the middle of developing a project. I am planning to put a battery in between the power supply and the pi so even if there are power interrupts the R...
by vvarrior
Fri Aug 31, 2018 3:54 pm
Forum: General discussion
Topic: If RPi gets unplugged, sometimes it stalls during boot
Replies: 7
Views: 558

Re: If RPi gets unplugged, sometimes it stalls during boot

I'll do some more investigation through the logs and try to recreate the event. It's always exciting trying to debug.
by vvarrior
Fri Aug 31, 2018 1:43 am
Forum: General discussion
Topic: If RPi gets unplugged, sometimes it stalls during boot
Replies: 7
Views: 558

Re: If RPi gets unplugged, sometimes it stalls during boot

It is a headless Pi Zero W on Raspbian Lite, so no desktop or VNC and a Mini HDMI port (and I don't have an adapter) so there's really no way to actually "see" what's going on. It's why I've fallen back to the logs. It stalled again today though when I pulled out the plug (without instructing it to ...
by vvarrior
Thu Aug 30, 2018 4:17 am
Forum: General discussion
Topic: If RPi gets unplugged, sometimes it stalls during boot
Replies: 7
Views: 558

If RPi gets unplugged, sometimes it stalls during boot

I am trying to determine the cause of this error. Once in a while there will be a power outage or a circuit breaker will trip and my RPi Zero W will stall on the next boot when power comes back up. It seems the only way I can fix the problem is to unplug it and plug it back in. I've looked through t...
by vvarrior
Mon Aug 27, 2018 1:05 pm
Forum: Advanced users
Topic: Best method to gather sensor data from Arduino
Replies: 8
Views: 4132

Re: Best method to gather sensor data from Arduino

That sounds like a complex setup. Comparatively, mine is pretty simple. Arduino measures TDS of nutrients, calculates TDS using temp and measures flow of a pump. The RPi uses the TDS to determine how much nutrient is added to the water.

Thanks for the info, i think that will guide how i implement it.
by vvarrior
Mon Aug 27, 2018 3:34 am
Forum: Advanced users
Topic: Best method to gather sensor data from Arduino
Replies: 8
Views: 4132

Re: Best method to gather sensor data from Arduino

If I'm reading the code right, Uno sends a pulse on a pin that alerts the Pi when the data is ready to collect from serial, using event detect on RPi. That's an interesting implementation. I'm guessing the reason for that is how the data is outputted by Arduino with Serial.print()? Arduino prints da...
by vvarrior
Mon Aug 27, 2018 1:01 am
Forum: Advanced users
Topic: Best method to gather sensor data from Arduino
Replies: 8
Views: 4132

Re: Best method to gather sensor data from Arduino

What is the method you use for your application? I think that's how I want to implement it. I've managed to reduce the Arduino sketch code by a third, and processing on the RPi side is a lot less because I don't have to process ALL of the data, just one data (floats mostly) at a time. I use a USB/Se...
by vvarrior
Sat Aug 25, 2018 3:46 pm
Forum: Advanced users
Topic: Best method to gather sensor data from Arduino
Replies: 8
Views: 4132

Re: Best method to gather sensor data from Arduino

I've noticed an issue that happens every once in a while that I think is a result of python trying to gather the data twice at the same time. I have cronjobs that run at different times that sometimes require the sensor data. Once in a while, I find an error in the logs (or am notified of an error) ...
by vvarrior
Sat Aug 25, 2018 3:08 pm
Forum: Advanced users
Topic: Best method to gather sensor data from Arduino
Replies: 8
Views: 4132

Best method to gather sensor data from Arduino

I am curious about how others process data from Arduino. I have an Arduino attached to my rpi through USB serial. My current implementation for getting the data from Arduino is to initialize the serial port using python and parse a comma delimited dict that's sent from Arduino. The Arduino loops and...
by vvarrior
Wed Aug 22, 2018 4:39 pm
Forum: Beginners
Topic: Assign static IP address based on wpa_supplicant id_str
Replies: 7
Views: 973

Re: Assign static IP address based on wpa_supplicant id_str

:lol: Haha, there's not a "network manager" here... Work is at a fire station, which usually equates to "tech illiterate" - they know how to put the wet stuff on the hot stuff. Any embarrassment I face is why I have so many circuit boards and flashy LEDs thingies littering my bunk. It would be like ...
by vvarrior
Tue Aug 21, 2018 9:38 pm
Forum: Beginners
Topic: Assign static IP address based on wpa_supplicant id_str
Replies: 7
Views: 973

Assign static IP address based on wpa_supplicant id_str

OS: Raspbian Stretch using strictly wpa_supplicant to connect to networks. I go from home to work and when I need to connect to my RPi at work, I plug it in directly to my laptop and assign the IPs statically. The problem is if the cat5 cable comes unplugged on accident, terminal closes. I think it ...
by vvarrior
Fri Aug 03, 2018 11:00 pm
Forum: Automation, sensing and robotics
Topic: Simple Flow Sensor Code that returns LPM
Replies: 3
Views: 443

Re: Simple Flow Sensor Code that returns LPM

Final class code: #!/usr/bin/python # flowsensor.py # fs = flow sensor pin - required # mode = used in set board mode (GPIO.BOARD or GPIO.BCM) # s = time in seconds - default 3 seconds # define the Flow class import RPi.GPIO as GPIO, time class Flow: # Initilize Flow class c = 0 # initialize count c...
by vvarrior
Fri Aug 03, 2018 7:51 pm
Forum: Automation, sensing and robotics
Topic: Simple Flow Sensor Code that returns LPM
Replies: 3
Views: 443

Re: Simple Flow Sensor Code that returns LPM

:oops: Well this is embarrassing... sensor was plugged into the wrong input pin. I moved it over one and the code performs successfully.
by vvarrior
Fri Aug 03, 2018 8:12 am
Forum: Automation, sensing and robotics
Topic: Simple Flow Sensor Code that returns LPM
Replies: 3
Views: 443

Re: Simple Flow Sensor Code that returns LPM

I have come up with the following code (modified from https://github.com/luizfzs/python-pi-sensor-modules/blob/master/WheelEncoder.py ), however, the event detection is not being trigger. I have the sensor wired properly, black to ground, red to 3.3 and yellow to PIN 27. I call this class from test....
by vvarrior
Wed Aug 01, 2018 9:57 pm
Forum: Automation, sensing and robotics
Topic: Simple Flow Sensor Code that returns LPM
Replies: 3
Views: 443

Simple Flow Sensor Code that returns LPM

I am looking for some simple code examples where I can import the .py file and call a function that returns a value with liters per minute (or hour or second for that matter). I simply need to make sure that once my pump is turned on, water is flowing. While the pump is on, I loop until the time is ...
by vvarrior
Mon Jul 30, 2018 3:06 am
Forum: Beginners
Topic: Struggling with VNC Server in Virtual Mode
Replies: 1
Views: 1190

Re: Struggling with VNC Server in Virtual Mode

I managed to get logged in with vnc viewer by using the IP address instead of the hostname with the same pi user. Using the hostname leaves an error message "cannot currently show desktop". Edit: It seems there is a cache that vncviewer is using to determine its ability to display the desktop, but I...
by vvarrior
Mon Jul 30, 2018 1:42 am
Forum: Beginners
Topic: Struggling with VNC Server in Virtual Mode
Replies: 1
Views: 1190

Struggling with VNC Server in Virtual Mode

I've got a raspberry pi 2 model B v1.2 with Raspbian 9/Stretch (full version, not lite). It is a fresh install and has been freshly updated and upgraded. The problem I experience is when connecting using VNC viewer on Windows, I get a small screen after I login that says "Cannot currently show the d...
by vvarrior
Sat Jun 30, 2018 7:07 pm
Forum: Beginners
Topic: Reduce SD Card Partition for backup
Replies: 7
Views: 436

Re: Reduce SD Card Partition for backup

Is there a way to choose how big its resized to?

Go to advanced search