Go to advanced search

by ghp
Sat Aug 10, 2013 10:04 am
Forum: Deutsch
Topic: Problem mit Schalter
Replies: 3
Views: 1661

Re: Problem mit Schalter

Hallo, habe Deinen Code mal ausprobiert. Habe keinen Schalter angeschlossen, sondern ein Stück Draht gegen Masse verwendet. Hier sehe ich auch das Verhalten, dass beim Schliessen und Öffnen jeweils der Callback ausgelöst wird. Bei 500ms debounce-Time funktioniert das dann recht zuverlässig, allerdin...
by ghp
Thu Aug 08, 2013 10:58 am
Forum: Deutsch
Topic: Erfahrungsberichte mit Relais 230V
Replies: 11
Views: 22511

Re: Erfahrungsberichte mit Relais 230V

Hallo, Ansteuerung mit Transistor mit 1k BasisWiderstand. Oder einen ULN2803 für ein paar mehr Kanäle. Habe seit einiger Zeit auch so ein Teil (nicht genau dasselbe) bei mir liegen und mal die Strom/Spannung am Eingang angesehen: der Strom war relativ konstant über den gesamten Spannungsbereich von ...
by ghp
Tue Aug 06, 2013 4:50 am
Forum: Deutsch
Topic: Temperatur/Luftfeuchtigkeit über Funk?
Replies: 9
Views: 20237

Re: Temperatur/Luftfeuchtigkeit über Funk?

Hallo, zigbee module sind u.U. eine Lösung. Zum Pi hin eine serielle Verbindung, entweder plain ascii oder eine api-implementierung. Hier gibt es Unterstützung in C oder java. Die Module sind für home-Automation entwickelt. Die Module haben digitale EA, und können auch Analog einlesen. Sendeleistung...
by ghp
Mon Aug 05, 2013 6:42 pm
Forum: Python
Topic: Stop continuous thread
Replies: 3
Views: 1443

Re: Stop continuous thread

Hello, python threads do not react to keyboard interrupts. You need to handle signals in main thread, ant then use a 'variable' to send a stop-signal to your thread. Example, just a sketch def Stepper(threading.Thread): runIt = None def __init__(self): runIt = True ... def run(self): while ( runIt )...
by ghp
Mon Aug 05, 2013 6:31 pm
Forum: Python
Topic: How to run a python or bash command from Apache
Replies: 4
Views: 1947

Re: How to run a python or bash command from Apache

Hello, you cannot run arbitary python scripts directly from apache, unless 'arbitary' is a subset of CGI-script. Apache can call CGI-Scripts written in python (or other languages). Google for 'python CGI', and you will find a world of tutorials. Your cgi-python-script can then call an 'arbitary' scr...
by ghp
Mon Jul 29, 2013 8:10 pm
Forum: Python
Topic: PHP->Python or is there a better method?
Replies: 3
Views: 1587

Re: PHP->Python or is there a better method?

Hello, php for the web interface, and python for backend gpio access. In between could be a plain socket conection. If you build the command in 'readable ascii', you can test the backend module with a telnet session. I have build a similiar project with python in the web front end. The advantages ar...
by ghp
Mon Jul 29, 2013 5:07 am
Forum: Python
Topic: Strings, lists and tuples muddle!
Replies: 9
Views: 1499

Re: Strings, lists and tuples muddle!

Gratulation !

You have used your knowledge to solve a problem. And reading in data structures simply by using "eval" is a pythonic solution and a nice point.
Good luck in further studies !

Gerhard
by ghp
Sun Jul 28, 2013 5:41 pm
Forum: Python
Topic: Help! Syntax error!!
Replies: 3
Views: 680

Re: Help! Syntax error!!

Hello, I assume, that you want to run the hello world as a python code, and in the console you first start python, and then you enter the "print "hello world"". When you start python interpreter, check the version information printed. (the following is from my system) pi@raspberrypi ~ $ python Pytho...
by ghp
Sun Jul 28, 2013 5:33 pm
Forum: Python
Topic: Strings, lists and tuples muddle!
Replies: 9
Views: 1499

Re: Strings, lists and tuples muddle!

I have choosen the dictionary, as your first code snippet was having three individual variables. When you read these in again, your code should be able to separate them easily. Dictionaries are a simple way to achieve this: flagc1 = theDictReadInFromJson['flagc1'] Lists will work similiar. The seque...
by ghp
Sun Jul 28, 2013 4:25 pm
Forum: Python
Topic: Strings, lists and tuples muddle!
Replies: 9
Views: 1499

Re: Strings, lists and tuples muddle!

Hello, for the storage of structured data, json is good choice. import json flagc1 = [1,25,[255,0,0],"Tartan Red"] flagc2 = [2,25,[0,255,0],"Green"] flagc3 = [3,25,[36,34,87],"Dark Blue"] data = { } data ['flagc1'] = flagc1 data ['flagc2'] = flagc2 data ['flagc3'] = flagc3 print(json.dumps(d)) # # r...
by ghp
Fri Jul 26, 2013 6:26 pm
Forum: Python
Topic: Using RPi.GPIO
Replies: 20
Views: 2982

Re: Using RPi.GPIO

usually by

apt-get update
apt-get upgrade -y

which will bring all of your modules to newest state. May last a while
by ghp
Fri Jul 26, 2013 3:56 pm
Forum: Python
Topic: Using RPi.GPIO
Replies: 20
Views: 2982

Re: Using RPi.GPIO

Hello, have a look to http://elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29 The numbering schemes are BOARD (pin numbers of the header) or according to the ARM-Chip BCM. I prefer the later. Not each of the BCM-chips es exposed., and some are occupied by serial line at...
by ghp
Wed Jul 24, 2013 6:11 pm
Forum: Troubleshooting
Topic: Client Server
Replies: 1
Views: 316

Re: Client Server

Hello, I would like to help, but I do not like to spend a lot of time in viewing a lengthy video. Pls post client and server code, this would help. Could be, that ip-addresses are not valid. On Laptop (Server, Windows?) use ipconfig to find out current ipAddress. On pi(== client), ping the laptop: i...
by ghp
Mon Jul 22, 2013 3:04 pm
Forum: HATs and other add-ons
Topic: SPI between Pi and GB
Replies: 9
Views: 4029

Re: SPI between Pi and GB

Hello, speed is not only a question on how fast the hardware can run, but also a matter on how fast the spi-handling code on 328 is performing. I have build a project, using SPI to an 328. It uses some 20 different commands and a few of them returning values from the 328 to the Pi. When looking to t...
by ghp
Thu Jul 18, 2013 2:22 pm
Forum: Python
Topic: Twitter With Python
Replies: 1
Views: 724

Re: Twitter With Python

Hello,

look for "http://code.google.com/p/python-twitter/".

Greetings,
Gerhard
by ghp
Thu Jul 18, 2013 1:54 pm
Forum: Deutsch
Topic: RPi kaputt?
Replies: 14
Views: 5792

Re: RPi kaputt?

Hallo, versuche mal folgendes: Kabel vom GPIO-Anschluss abziehen (damit ggf. kurzschlüsse der externen Verkabelung ausgeschlossen sind). Ausschalten, Einschalten. Wenn es funktioniert dann sind die Kabel schuld oder irgenwas, was da dran hängt. Wenn es nicht funktioniert, dann SD-Karte neu bespielen...
by ghp
Tue Jul 16, 2013 3:21 pm
Forum: Deutsch
Topic: Shutdown-Taster macht sich selbstständig
Replies: 24
Views: 11134

Re: Shutdown-Taster macht sich selbstständig

Hallo Fly,

hat sich hier was ergeben in der Zwischenzeit ? Du wolltest ja den Aufbau löten, und vermutlich sollte ja dann Stabilität einkehren...

Gerhard
by ghp
Tue Jul 16, 2013 7:25 am
Forum: Other projects
Topic: clear case, mounting possibilities and ribbon cable slot
Replies: 2
Views: 1087

Re: clear case, mounting possibilities and ribbon cable slot

Thank you, looks perfect.

Gerhard
by ghp
Tue Jul 16, 2013 5:33 am
Forum: Python
Topic: Controlling a stepper motor Raspberry Pi Python
Replies: 2
Views: 3689

Re: Controlling a stepper motor Raspberry Pi Python

Hello, in python, natural choice for modularization is using classes. I have no working sample, but code could look like: # # Warning: not tested, not working without additional work # class Motor_28BJY-48: MOTOR_PIN1 = 22 MOTOR_PIN2 = 23 MOTOR_PIN3 = ... MOTOR_PIN4 = ... # keep a position counter p...
by ghp
Mon Jul 15, 2013 5:22 am
Forum: Deutsch
Topic: TEKO Raspberry Gehäuse
Replies: 8
Views: 2786

Re: TEKO Raspberry Gehäuse

Hallo,

es gibt einen eigenen Thread über 'cases' hier im Forum.
Da wurde mir das folgende Gehäuse empfohlen:
"Something like the Pi Tin?
https://www.sparkfun.com/products/11623" gibt es z.B. bei exp-tech.

Grüsse
Gerhard
by ghp
Sat Jul 13, 2013 8:59 pm
Forum: Other projects
Topic: clear case, mounting possibilities and ribbon cable slot
Replies: 2
Views: 1087

clear case, mounting possibilities and ribbon cable slot

Hallo, I look for a case with following features: - clear, for Model B - bottom side some holes for fixing screws - top side a slot for GPIO ribbon cable - quite cheap, the pimonori is real nice, bit almost double the price as farnell or RS. I need 10+ for a school project, so price is critical. Is ...
by ghp
Sat Jul 13, 2013 8:47 pm
Forum: Python
Topic: Python libraries for hardware ports like i2c, spi
Replies: 2
Views: 1269

Re: Python libraries for hardware ports like i2c, spi

Hello, for SPI, use "spidev". You also need to start the driver "sudo modprobe spi_bcm2708". There are good tutorials at adafruit, demonstrating SPI for python. The code snipped is just copied and shorted from one of may programs. It just demonstrates the basic usage. # -*- coding: utf-8 -*- import ...
by ghp
Sat Jul 13, 2013 8:37 pm
Forum: Deutsch
Topic: JavaFx
Replies: 8
Views: 2339

Re: JavaFx

Hallo, das java-Beispiel ist aus http://docs.oracle.com/javase/tutorial/uiswing/examples/components/. Hier habe ich mir eine der table-Demos rausgesucht. Habe das wie folgt implementiert: [win] in eclipse die java-Files übersetzen, Compatibility 1.6 [pi] console öffnen, 'java -version' aufrufen, es ...
by ghp
Sat Jul 13, 2013 3:06 pm
Forum: Deutsch
Topic: JavaFx
Replies: 8
Views: 2339

Re: JavaFx

Hallo, habe gerade probehalber ein kleines java-Programm auf meinem win-PC in eclipse zusammengebaut. Eine TableEditor-Demo von der java-tutorial-webpage. Dann mit 1.6-Level compiliert und die classes auf den raspberry übertragen. Dort ist openjdk installiert, und die Anwendung läuft. Zum Start brau...
by ghp
Tue Jul 09, 2013 5:51 pm
Forum: Beginners
Topic: How worried should I be about not using a case?
Replies: 15
Views: 12997

Re: How worried should I be about not using a case?

Hello,

for my first PI, I just have cut holes into the paperbox. Think the greatest problem are pieces of wire, usb-cables (the metal end) or alike falling into the precious electronics.

Greetings
Gerhard

Go to advanced search