Go to advanced search

by cacti
Thu Jun 16, 2016 3:54 pm
Forum: Advanced users
Topic: rpi3 as AP without bridging
Replies: 3
Views: 882

Re: rpi3 as AP without bridging

You can also enable bridging and then use iptables to manage exactly what you want to let through. Just remember to load the bridging modules to enable the forward chain. If you don't want to allow anything however the above should work.
by cacti
Mon Jun 13, 2016 6:44 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Serial Communication Question
Replies: 14
Views: 2162

Re: Serial Communication Question

While the handshake line is high, the device pauses its actual work and listens for a command. Once it receives that command, it replies with an acknowledgment and checksum, and then waits for further commands if the checksum was incorrect. If the "Master" device agrees that the acknowledgement is ...
by cacti
Mon Jun 13, 2016 6:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Serial Communication Question
Replies: 14
Views: 2162

Re: Serial Communication Question

You can use any general purpose GPIO pin. For example to use GPIO2 (pin 3). To switch GPIO2 high (3.3v) do the following: $ sudo python >>> import RPi.GPIO as GPIO >>> GPIO.setup(2, GPIO.OUT) >>> GPIO.output(2, True) GPIO2 is Pin 3 on my board....Would that output a 3.3V signal or a 5V signal? All ...
by cacti
Mon Jun 13, 2016 6:27 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Serial Communication Question
Replies: 14
Views: 2162

Re: Serial Communication Question

The handshake isn't for the Pi, it's for the peripheral. The Pi is the "Master" unit, but it has to set the "Handshake" line high or the "Slave" unit will ignore it. Not my design, I wish it wasn't set up that way, because I think that's going to make my life miserable... Sounds like you can just c...
by cacti
Mon Jun 13, 2016 6:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Serial Communication Question
Replies: 14
Views: 2162

Re: Serial Communication Question

I'm not sure which RPi board you are using. Check this out for differences and a short tutorial on GPIO in Python.

http://www.raspberrypi-spy.co.uk/2012/0 ... -and-pins/
by cacti
Mon Jun 13, 2016 6:06 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Serial Communication Question
Replies: 14
Views: 2162

Re: Serial Communication Question

You can use any general purpose GPIO pin. For example to use GPIO2 (pin 3).

To switch GPIO2 high (3.3v) do the following:

$ sudo python
>>> import RPi.GPIO as GPIO
>>> GPIO.setup(2, GPIO.OUT)
>>> GPIO.output(2, True)
by cacti
Mon Jun 13, 2016 5:08 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Serial Communication Question
Replies: 14
Views: 2162

Re: Serial Communication Question

You first need to enable Serial communication. Here is a guide that will get you started.

http://www.instructables.com/id/Read-an ... pberry-Pi/
by cacti
Mon Jun 13, 2016 4:42 pm
Forum: Advanced users
Topic: rpi3 as AP without bridging
Replies: 3
Views: 882

Re: rpi3 as AP without bridging

You can disable forwarding by: sysctl -w net.ipv4.ip_forward=1 or echo 1 > /proc/sys/net/ipv4/ip_forward To make the changes permanent you must edit /etc/sysctl.conf and add net.ipv4.ip_forward=0 You can check the status of forwarding using: cat /proc/sys/net/ipv4/ip_forward Or by executing: sysctl ...
by cacti
Mon Jun 13, 2016 4:21 pm
Forum: General programming discussion
Topic: GUI for Embedded, Window IOT Alternative
Replies: 9
Views: 4119

Re: GUI for Embedded, Window IOT Alternative

You are right. Updates can only be deferred for "several months". It seems it is not clear how long this is but it is clear that you cannot defer indefinitely. Also remember that security updates cannot be deferred.
by cacti
Thu May 19, 2016 2:09 pm
Forum: Advanced users
Topic: How to measure power consumption for running python code
Replies: 6
Views: 3055

Re: How to measure power consumption for running python code

You can built a simple circuit and send the data via a ADC to the Pi. Python can then read the digital data and convert it to current used. Without an external circuit feeding the Pi with data you cannot read the current used.
by cacti
Wed May 18, 2016 8:36 pm
Forum: Raspbian
Topic: How to create an image (.img) from a filesystem
Replies: 10
Views: 3007

Re: How to create an image (.img) from a filesystem

Booting is an absolute requirement. There must be an opportunity. What happens if the guys from raspbian say "okay this is our new version xyz, lets make a bootable image out of the things we coded". Of coarse you can. It is just not as simple as just writing files to an image file using dd. Did yo...
by cacti
Wed May 18, 2016 7:49 pm
Forum: Raspbian
Topic: How to create an image (.img) from a filesystem
Replies: 10
Views: 3007

Re: How to create an image (.img) from a filesystem

Sorry I forgot to mention that you should add the "offset" switch to the mount command since the image will contain two partitions. You most probably want to mount the second partition and not the boot partition. Let me know if you need a more detailed explanation. Once the image is mounted you can ...
by cacti
Wed May 18, 2016 7:27 pm
Forum: Raspbian
Topic: How to create an image (.img) from a filesystem
Replies: 10
Views: 3007

Re: How to create an image (.img) from a filesystem

Please correct me: Afak, puppet is a scripting language used to setup a linux(?) system. This would work of course, but if I have probably no network available and I want to setup 500 clients at once this wouldn't work out well. Yes, in that case puppet will not work. You can create an image of fil...
by cacti
Wed May 18, 2016 7:04 pm
Forum: Raspbian
Topic: How to create an image (.img) from a filesystem
Replies: 10
Views: 3007

Re: How to create an image (.img) from a filesystem

Instead of using git you can also consider using puppet.
by cacti
Wed May 18, 2016 6:57 pm
Forum: Raspbian
Topic: How to create an image (.img) from a filesystem
Replies: 10
Views: 3007

Re: How to create an image (.img) from a filesystem

Why don't you just resize the Image to be the size of the data and not the SD card? I have never had any issues creating and resizing images. You would always be able to automatically modify specific config files, etc. using git after the "generic" image has been deployed.
by cacti
Wed May 18, 2016 10:49 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C failure rate
Replies: 34
Views: 9009

Re: I2C failure rate

I have never seen read problems, but have experienced write issues. What I currently do is to read the result after a write and to re-write when needed.
by cacti
Wed May 18, 2016 9:54 am
Forum: Beginners
Topic: Arduino + Raspberry Pi connection through 3.3 and relay?
Replies: 10
Views: 2693

Re: Arduino + Raspberry Pi connection through 3.3 and relay?

Since your trigger is only in one direction (from the Arduino to the RPi) I would use a simple transistor to act as a switch (with level conversion). You could also use a resitor devider or a 3.3v zenner with resistor. Just search for "transistor level comversion" on Google.
by cacti
Sun May 15, 2016 5:04 pm
Forum: Automation, sensing and robotics
Topic: Raspberry pi to turn 64 lights on and off through web app
Replies: 5
Views: 2043

Re: Raspberry pi to turn 64 lights on and off through web ap

With 8 x Mcp23017's you can switch 128 devices (without additional multiplexing). I have developed a Web interface to switch and schedule the switching.
by cacti
Fri May 13, 2016 11:51 am
Forum: Automation, sensing and robotics
Topic: Home security/automation advice
Replies: 7
Views: 1778

Re: Home security/automation advice

Also consider the NRF24L01
by cacti
Fri May 13, 2016 10:48 am
Forum: Automation, sensing and robotics
Topic: Home security/automation advice
Replies: 7
Views: 1778

Re: Home security/automation advice

Cancelor wrote:I would use the ESP8266 for each ...
Agreed. You can use the ESP8266 alone (without Arduino) with a transistor to switch a relay. Cheap and effective.
by cacti
Fri May 13, 2016 8:34 am
Forum: Python
Topic: Display returned value from Python function on HTML webpage
Replies: 11
Views: 7445

Re: Display returned value from Python function on HTML webp

dddomodossola wrote:Ghans is right!
You will not need apache, php and so on... Just Python and REMI library.
Well I suppose that depends what solution is used ;)
All the suggested solutions will work.
by cacti
Thu May 12, 2016 7:52 pm
Forum: Python
Topic: Display returned value from Python function on HTML webpage
Replies: 11
Views: 7445

Re: Display returned value from Python function on HTML webp

Maybe my previous answer is a bit ambiguous. Here follows a better attempt. I suppose you have Apache up and running, but just to make sure execute the following: sudo apt-get install apache2 To install PHP: sudo apt-get install php5 libapache2-mod-php5 This code will execute a directory listing of ...
by cacti
Thu May 12, 2016 7:29 pm
Forum: Python
Topic: Display returned value from Python function on HTML webpage
Replies: 11
Views: 7445

Re: Display returned value from Python function on HTML webp

If you use PHP you could just execute something like:

Code: Select all

$result = system("/path_to_python_script/python_script.py");
by cacti
Thu May 12, 2016 7:17 pm
Forum: Raspbian
Topic: enable ssh on raspbian jessie
Replies: 14
Views: 110746

Re: enable ssh on raspbian jessie

You can enable ssh in using systemctl, but the easiest is probably by using raspi-config. The SSH option is under Advanced Options.
by cacti
Thu May 12, 2016 6:58 pm
Forum: Beginners
Topic: PI 3 and Raspbian Wheezy
Replies: 48
Views: 44592

Re: PI 3 and Raspbian Wheezy

Hi kise I can share the image, I did however not bother to get the Bluetooth running since I don't use it. I’m sure it could be done though. Let me know if you still want the image. Is the Pi the A2PD source or receiver? If the Pi is the source for example to connect to Bluetooth speakers it’s very ...

Go to advanced search