Go to advanced search

by anders_w
Wed Mar 14, 2018 11:59 am
Forum: Other programming languages
Topic: Beginner's book to javascript & node.js
Replies: 1
Views: 858

Beginner's book to javascript & node.js

Can anyone recommend a book on javascript and node.js?
by anders_w
Wed Mar 14, 2018 10:59 am
Forum: General programming discussion
Topic: Python, Java or both?
Replies: 23
Views: 7800

Re: Python, Java or both?

Javascript, You say? Hm...

Is there any beginner's guide to it that You could recommend? Or one for node.js? Or both?
by anders_w
Wed Mar 14, 2018 9:27 am
Forum: General programming discussion
Topic: Python, Java or both?
Replies: 23
Views: 7800

Python, Java or both?

I am beginning a project where an RPi will be running a big control panel with a lot of lights and switches. In a second phase, it will be interfaced against other HW and SW that runs java code. I'm unsure as to what programming language to use, though. The panel interface will run through a number ...
by anders_w
Thu Oct 13, 2016 11:25 am
Forum: HATs and other add-ons
Topic: Physical measurements for the GPIO port
Replies: 1
Views: 411

Physical measurements for the GPIO port

Greetings!

Does anyone have access to information about what standards the physical port for the GPIO conforms to?

I am in need of such information in order to determina which commercially available contacts to use for a Pi-hat project.


Best regards,

Anders
by anders_w
Wed Aug 20, 2014 1:10 pm
Forum: Python
Topic: Statement ok in IDLE shell, but not in script
Replies: 13
Views: 1904

Re: Statement ok in IDLE shell, but not in script

No offense taken.

Yes, both IDLE (runtime) and RPi python3 say "SyntaxError"
by anders_w
Wed Aug 20, 2014 11:44 am
Forum: Python
Topic: Statement ok in IDLE shell, but not in script
Replies: 13
Views: 1904

Re: Statement ok in IDLE shell, but not in script

By the way: Is it possible to use some sort of shell script to make the RPi start the script automatically whenever the RPi boots up?
The RPi uses Raspbian, and I am not sure how to make a script "self-starting" at boot-up.
by anders_w
Wed Aug 20, 2014 11:41 am
Forum: Python
Topic: Statement ok in IDLE shell, but not in script
Replies: 13
Views: 1904

Re: Statement ok in IDLE shell, but not in script

The posted code is littered with typos and would be better not starting with #!/bin/sh! (I will assume the BOM was added by dropbox.) None of the errors appear to relate to time.sleep, however. I'm not surprised at the typos, since it's my first venture into this programming language. The first few...
by anders_w
Wed Aug 20, 2014 11:23 am
Forum: Python
Topic: Statement ok in IDLE shell, but not in script
Replies: 13
Views: 1904

Re: Statement ok in IDLE shell, but not in script

I managed to access a copy of the script that I had on Dropbox: https://dl.dropboxusercontent.com/u/31856075/RPi_Watchdog/Watchdog.py Edit: No, there is no time-document in the script folder. Edit #2: The indentation seems to be a plausible explanation. It differs slightly depending on what software...
by anders_w
Wed Aug 20, 2014 9:57 am
Forum: Python
Topic: Statement ok in IDLE shell, but not in script
Replies: 13
Views: 1904

Re: Statement ok in IDLE shell, but not in script

thank you. I'll post the code when I get home from work.

I've imported the entire time module, in order to be able to get current time for time stamps, so the import statement is just

Code: Select all

import time
by anders_w
Wed Aug 20, 2014 9:02 am
Forum: Python
Topic: Statement ok in IDLE shell, but not in script
Replies: 13
Views: 1904

Statement ok in IDLE shell, but not in script

Hello! I'm having problems with my first Python program. To be precise, it's the calling of " time.sleep ". When I call time.sleep in the IDLE shell, it works perfectly. (I started by importing the time module, and setting a variable for the sleep duration). When it is part of a script, however, bot...
by anders_w
Mon Aug 18, 2014 12:34 pm
Forum: Python
Topic: First Py program: sense, act, ssh
Replies: 0
Views: 345

First Py program: sense, act, ssh

Hi! I am turning a Pi into a watchdog to supervise a crashing computer. Since I have not used Python before, I'm wondering if anyone has any opinions on the code: https://dl.dropboxusercontent.com/u/31856075/RPi_Watchdog/Watchdog.py . The set-up: The Pi listens to the 5V feed on the computer's USB p...
by anders_w
Tue Jul 29, 2014 4:47 pm
Forum: Automation, sensing and robotics
Topic: Pi as a hardware watchdog/reset
Replies: 6
Views: 1526

Re: Pi as a hardware watchdog/reset

OK, here is the first draft in human-readable form: Initialize Set constants and initial states Set Servo_Out_PWM_Pin to Low_Level Start-state Wait for Input_Pin to go LOW Set Servo_Out_PWM_Pin to High_Level Wait for 6 seconds Set Servo_Out_PWM_Pin to Low_Level Wait for 10 seconds Set Servo_Out_PWM_...
by anders_w
Sun Jul 20, 2014 10:42 am
Forum: Automation, sensing and robotics
Topic: Pi as a hardware watchdog/reset
Replies: 6
Views: 1526

Re: Pi as a hardware watchdog/reset

Finally a port! Thanks for the link. I suspect that it will not work, though. The file system is 32 TB, and the Macintosh port of ZFS wants 1 GB of RAM per TB of ZFS disk space (which would require a Mac Pro, which I cannot afford, hence the reboot problems with the current server), so I do not thin...
by anders_w
Sun Jul 20, 2014 10:06 am
Forum: Automation, sensing and robotics
Topic: Pi as a hardware watchdog/reset
Replies: 6
Views: 1526

Re: Pi as a hardware watchdog/reset

Thank You both. I had simplified the problem somewhat; there are reasons for wanting to use the Pi that I have already got. (I got the Pi for a different project, which turned out to be more suitable for Arduino. Since then, the Pi has just been gathering dust.) Chief among these reasons are that I ...
by anders_w
Sat Jul 19, 2014 7:43 am
Forum: Automation, sensing and robotics
Topic: Pi as a hardware watchdog/reset
Replies: 6
Views: 1526

Pi as a hardware watchdog/reset

Greetings, everybody! I'm about to embark on my first Pi project, and will probably need a little help as I go, particularly regarding writing the software, since I have never used Python before. Project description: The problem I have a small computer working as a file server with an external hard ...

Go to advanced search