Go to advanced search

by ondrej
Mon May 27, 2019 8:06 pm
Forum: Other projects
Topic: Using RPI as House Alarm controller
Replies: 2
Views: 335

Re: Using RPI as House Alarm controller

Why are you not solving this in software. For example this to get a idea (not real code): if hardware pin = high or software pin = high: Alarm = active Else Alarm = deactivate You could also write it in a way that one overrule the other. Yes this is what I was thinking .. to introduce another pin j...
by ondrej
Mon May 27, 2019 7:42 pm
Forum: Other projects
Topic: Using RPI as House Alarm controller
Replies: 2
Views: 335

Using RPI as House Alarm controller

Hi coders, yes I use RPI as House Alarm controller for many years, however now I discovered some limitations that I need to resolve by HW or SW change. The problem: There is GPIO port responsible to tell alarm script if Alarm is enabled or disabled. The gpio port is controlled by HW switch (not a bu...
by ondrej
Fri Feb 10, 2017 11:11 am
Forum: Advanced users
Topic: Quick question regarding topology on a Raspberry Pi FW
Replies: 1
Views: 391

Re: Quick question regarding topology on a Raspberry Pi FW

My Topology is like this

ISP router in bridged mode -> Cisco switch with VLANs defined -> RPi with 802.1Q vlan support on eth0 (public IP)

RPi acts here as router for whole LAN with solid throughput 50Mbit/s in 100mbit/s interface
it is very stable topology
cannot complain
by ondrej
Mon Aug 29, 2016 7:37 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Measuring current with INA219
Replies: 10
Views: 6925

Re: Measuring current with INA219

The current reading I get seems to be correct while the voltage is completely off. I should get about 12V but instead it measures 32V most of the time, sometimes 4V. if you dont have voltage, it looks you did not connect (-) minus poles from the PWR you try to measure voltage for, to Rpi (-) pole. ...
by ondrej
Thu Aug 25, 2016 8:18 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Measuring current with INA219
Replies: 10
Views: 6925

Re: Measuring current with INA219

Has anyone got correct numbers on RPI ? yes. you need to check if that code is good. OK, and could you share your code please? Looks that mystery is resolved. Both INA219 modules I received from ebay and tested here were faulty. Today I got new ones from different seller (B version - more precise) ...
by ondrej
Sat Aug 20, 2016 5:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Measuring current with INA219
Replies: 10
Views: 6925

Re: Measuring current with INA219

Massi wrote:
ondrej wrote:Has anyone got correct numbers on RPI ?
yes.
you need to check if that code is good.

OK, and could you share your code please?
by ondrej
Sun Aug 07, 2016 12:12 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Measuring current with INA219
Replies: 10
Views: 6925

Re: Measuring current with INA219

I have also problem with INA219 and getting nonsense values with RPi B+ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- ...
by ondrej
Tue Aug 02, 2016 9:52 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Measuring current with INA219
Replies: 10
Views: 6925

Re: Measuring current with INA219

I have also problem with INA219 and getting nonsense values with RPi B+ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -...
by ondrej
Mon Jul 25, 2016 5:49 pm
Forum: HATs and other add-ons
Topic: A - D converters...
Replies: 11
Views: 24461

Re: A - D converters...

ondrej wrote:however I am getting as example following values: 96 211 91 255.
These are values of all 4 analog channels of PCF8591 (IN0-IN3)
by ondrej
Sun Mar 27, 2016 11:10 am
Forum: Troubleshooting
Topic: modmypi Protected GPIO Extender Kit with ds18b20?
Replies: 1
Views: 418

Re: modmypi Protected GPIO Extender Kit with ds18b20?

I removed zener diode from pin 4 and it started to work, so i assume that temperature sensor and zener diode does not like each other.
by ondrej
Sat Mar 26, 2016 9:47 pm
Forum: Troubleshooting
Topic: modmypi Protected GPIO Extender Kit with ds18b20?
Replies: 1
Views: 418

modmypi Protected GPIO Extender Kit with ds18b20?

Hi, I have been using ds18b20 mapped at GPIO pin 4 successfully long time. later I decided to put also Protected GPIO Extender Kit by modmypi http://www.modmypi.com/raspberry-pi/breakout-boards/cyntech/rpi-b-plus2-protected-gpio-extender-kit , I soldered all pins with no issues, however when I inser...
by ondrej
Wed Feb 17, 2016 10:22 am
Forum: Networking and servers
Topic: Turn the Raspberry Pi B+ into a WiFi router using an LTE mod
Replies: 10
Views: 6423

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE

hi momoz,

i already sent you request for print out of ifconfig, ip r and iptables-save commands to help you. for more i advise you to study IP routing and IP tables ;)
by ondrej
Thu Feb 11, 2016 6:26 pm
Forum: Networking and servers
Topic: Turn the Raspberry Pi B+ into a WiFi router using an LTE mod
Replies: 10
Views: 6423

Re: Turn the Raspberry Pi B+ into a WiFi router using an LTE

provide ifconfig, ip r and iptables-save outputs
by ondrej
Fri Feb 05, 2016 9:56 am
Forum: Networking and servers
Topic: How to set up a Raspberry Pi VPN server
Replies: 99
Views: 230550

Re: How to set up a Raspberry Pi VPN server

Code: Select all

systemctl start [email protected]
systemctl stop [email protected]
systemctl status [email protected]
whereas xxxx = your client start script with .conf extension
example /etc/openvpn/client.conf

Code: Select all

systemctl start [email protected]
by ondrej
Mon Jan 11, 2016 12:50 pm
Forum: Troubleshooting
Topic: Help with crash investigation
Replies: 0
Views: 266

Help with crash investigation

Hi all, my RPi crashed at trivial operation, that has been performed thousands time before without any issue. Operation was to reload webpage with PHP script writing data to file and to mysql DB. I'd like to know why the RPi crashed and how to avaid to happen this again. More serious, that RPI got s...
by ondrej
Fri Jan 08, 2016 2:15 pm
Forum: Python
Topic: Distinguish GPIO triggers
Replies: 2
Views: 564

Re: Distinguish GPIO triggers

anyone?
by ondrej
Sun Dec 20, 2015 8:57 pm
Forum: Python
Topic: Distinguish GPIO triggers
Replies: 2
Views: 564

Distinguish GPIO triggers

Hello,
my question is if is possible to separate GPIO events on same GPIO PIN, that has been caused by hardware buttons or by GPIO library state change? anyone has been working on this? in other words how do I know if button was preset on change was triggered by software library?
thanks
by ondrej
Thu Nov 19, 2015 8:09 pm
Forum: Troubleshooting
Topic: again corrupted SD card, is my FSCKFIX paramer ignored?
Replies: 4
Views: 910

Re: again corrupted SD card, is my FSCKFIX paramer ignored?

ok, agree. all my corruption happened when I had to disconnect power by force having issues with script or connectivity. I managed now both, so no need to handle rpi power wrong way.

closing this topic.
by ondrej
Mon Nov 09, 2015 1:58 pm
Forum: Troubleshooting
Topic: again corrupted SD card, is my FSCKFIX paramer ignored?
Replies: 4
Views: 910

Re: again corrupted SD card, is my FSCKFIX paramer ignored?

thanks DougieLawson, but this is not my problem. I know about DC issues, but this is happening. that's live.

i am searching for remedy.

i did not have set:
# spawn sulogin during boot, continue normal boot if not used in 30 seconds
SULOGIN=no


can it be the issue, that it hangs?
by ondrej
Mon Nov 09, 2015 9:58 am
Forum: Troubleshooting
Topic: again corrupted SD card, is my FSCKFIX paramer ignored?
Replies: 4
Views: 910

again corrupted SD card, is my FSCKFIX paramer ignored?

hello everyone, i am on raspbian. again as many times before I had SD corruption and I ended up with "Enter root password for maintenance". I usually fix this fast doing fsck on specific partition. Even I added FSCKFIX=yes to /etc/default/rcS, it looks, it does not have any effect. Anytime SD is cor...
by ondrej
Wed Oct 21, 2015 3:08 pm
Forum: Python
Topic: Need help with GPIO.add_event_detect GPIO.BOTH
Replies: 5
Views: 1067

Re: Need help with GPIO.add_event_detect GPIO.BOTH

thanks for your doubts :) it is working as expected now. final code: GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) latest_AC_status = GPIO.input(27) def gpio_220v_trigger(channel): time.sleep(1) # need to filter out the false positive of some power fluctuation global latest_AC_status if (latest_...
by ondrej
Wed Oct 21, 2015 2:46 pm
Forum: Python
Topic: Need help with GPIO.add_event_detect GPIO.BOTH
Replies: 5
Views: 1067

Re: Need help with GPIO.add_event_detect GPIO.BOTH

ok I tried to simplify that: GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) latest_AC_status = GPIO.input(27) GPIO.add_event_detect(27, GPIO.BOTH, callback=gpio_220v_trigger, bouncetime=1000) def gpio_220v_trigger(latest_AC_status, channel): time.sleep(1) # need to filter out the false positive o...
by ondrej
Wed Oct 21, 2015 2:05 pm
Forum: Python
Topic: Need help with GPIO.add_event_detect GPIO.BOTH
Replies: 5
Views: 1067

Re: Need help with GPIO.add_event_detect GPIO.BOTH

thanks for reply, hmm why strange code? :) re: 1st doubt: I was having many fake triggers so I wanted to make sure that edge will will be captured just once. i was starting with bounce time 200ms, but 200-2000 makes no difference. should I change that parameter? what value is optimal? (btw interfere...
by ondrej
Wed Oct 21, 2015 1:36 pm
Forum: Python
Topic: Need help with GPIO.add_event_detect GPIO.BOTH
Replies: 5
Views: 1067

Need help with GPIO.add_event_detect GPIO.BOTH

Hello, i am trying to write a code to reliably detect GPIO.BOTH edges. I have some electrical interferences in HW installations that I would like to handle by code. Problem: electrical interferences causing triggering GPIO.BOTH edges and one conditions is indeed valid even if edge is false caused by...
by ondrej
Sat Oct 17, 2015 8:08 pm
Forum: Python
Topic: GPIO status handling by python vs. handling by bash
Replies: 4
Views: 960

Re: GPIO status handling by python vs. handling by bash

no GPIO 18 was never set as IN. make 100% sure to have clean environment I do cleanup at beginning, which i normally dont do complete code: Type "help", "copyright", "credits" or "license" for more information. >>> import RPi.GPIO as GPIO >>> GPIO.setmode(GPIO.BCM) >>> GPIO.cleanup() __main__:1: Run...

Go to advanced search