Go to advanced search

by stockton
Mon Jan 11, 2021 1:24 pm
Forum: C/C++
Topic: Calculation anomaly
Replies: 21
Views: 1429

Calculation anomaly

Interesting that the following calculations in gcc on my Raspberry 4 8 which should give the same answer, do not double radius_cm = 7; float Circumference = 0; Circumference = (22 / 7) * (2 * radius_cm) gives 42 as the answer (wrong) whereas Circumference = (22 * (2 * radius_cm)) / 7 results in 44 (...
by stockton
Fri Dec 25, 2020 6:59 am
Forum: General programming discussion
Topic: DF Robot Weather station to Raspberry Pi 3Bv2
Replies: 2
Views: 475

Re: DF Robot Weather station to Raspberry Pi 3Bv2

Yes I have. That is where I got the baud rate and if you see anything you feel that I may have missed please don't hesitate to point it out.
by stockton
Thu Dec 24, 2020 10:07 am
Forum: General programming discussion
Topic: DF Robot Weather station to Raspberry Pi 3Bv2
Replies: 2
Views: 475

DF Robot Weather station to Raspberry Pi 3Bv2

I am interfacing the DF Robot weather station with a Raspberry pi 3Bv2 because I want the data on the internet and but I am currently having a problem getting the data from the DF Robot board to the Raspberry via serial connection. I have made the following connections from DF Robot to Raspberry. Vc...
by stockton
Fri Dec 18, 2020 4:54 pm
Forum: General programming discussion
Topic: Explain switch debouncing
Replies: 9
Views: 892

Re: Explain switch debouncing

VitalSpark, won't you please explain how your boolean suggestion gets around switch bounce.
I also do not understand your Void(test_switch)void Please explain.
by stockton
Fri Dec 18, 2020 10:21 am
Forum: General programming discussion
Topic: Explain switch debouncing
Replies: 9
Views: 892

Explain switch debouncing

It appears to me that if one monitors a switch in C wiringPi one should "debounce" but if one is using python "debounce" is not necessary. See various examples in the examples in wiringPi as well as Arduino sites, compared to, for example the Raspberry Projects "build your o...
by stockton
Sun Oct 25, 2020 9:42 am
Forum: Advanced users
Topic: Cannot receive internet email
Replies: 8
Views: 344

Re: Cannot receive internet email

I believe that they do allow it but short of asking them is there any way I can check. The website is stockton.co.za and the emails I want to receive for are alf@stockton.co.za and adrian@stockton.co.za
In fact the router is under my control and I have set up the required ports.
by stockton
Sun Oct 25, 2020 8:51 am
Forum: Advanced users
Topic: Cannot receive internet email
Replies: 8
Views: 344

Cannot receive internet email

In an attempt to setup a personal webmail server on my Raspbian Buster Raspberry V4 I have installed postfix and dovecot as per the scenario at samhobbs.co.uk and tested as well as I am able from withing my network and all is well. I can send and receive email from and to any of the machines on my I...
by stockton
Sun Jun 14, 2020 9:43 am
Forum: Python
Topic: imagetogcode on Raspberry 4 on raspbian
Replies: 7
Views: 555

Re: imagetogcode on Raspberry 4 on raspbian

Again thank you. When I run sudo apt-get install python3-pil.imagetk I get Reading package lists... Done Building dependency tree Reading state information... Done python3-pil.imagetk is already the newest version (5.4.1-2+deb10u1). 0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded. but...
by stockton
Sat Jun 13, 2020 1:58 pm
Forum: Python
Topic: imagetogcode on Raspberry 4 on raspbian
Replies: 7
Views: 555

Re: imagetogcode on Raspberry 4 on raspbian

Thank you. I ran pip install ImageTk but got
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/imagetk

Do I try again later or do I have a bigger problem/challenge?
by stockton
Sat Jun 13, 2020 1:12 pm
Forum: Python
Topic: imagetogcode on Raspberry 4 on raspbian
Replies: 7
Views: 555

Re: imagetogcode on Raspberry 4 on raspbian

Thank you. Now me not being a Python programmer have to ask how I inplement(or is it install) it?
by stockton
Sat Jun 13, 2020 10:37 am
Forum: Python
Topic: imagetogcode on Raspberry 4 on raspbian
Replies: 7
Views: 555

imagetogcode on Raspberry 4 on raspbian

I am attempting to implement image-to-gcode.py on my Raspian OS Raspberry 4 and I get:-

from PIL import ImageTk

Please tell mem how I resolve this?
by stockton
Tue Apr 14, 2020 2:36 pm
Forum: Python
Topic: Raspberry Zero parking meter sensor & LEDS
Replies: 2
Views: 287

Re: Raspberry Zero parking meter sensor & LEDS

Thank you it now works. The two reds was silly but I do need to learn about indentation.
by stockton
Tue Apr 14, 2020 1:59 pm
Forum: Python
Topic: Raspberry Zero parking meter sensor & LEDS
Replies: 2
Views: 287

Raspberry Zero parking meter sensor & LEDS

I have created the following code, mainly from cut and paste for the HC-SR04 code but the bit about the LEDS is mine. For the life of me I cannot see why I only ever get a green led no matter the distance. #Libraries import RPi.GPIO as GPIO import time #GPIO Mode (BOARD / BCM) GPIO.setmode(GPIO.BCM)...
by stockton
Fri Feb 28, 2020 2:04 pm
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Re: Testing website from local network

It now appears to be working for me. If I am correct in that, the solution on my machine is as follows:- I am running Rasbian and therefore the Apache configuration follows the Debian way. Apache needs to listen to port 80 both as an external link(DNS) & internal link(IP). I achieved this after ...
by stockton
Fri Feb 28, 2020 9:14 am
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Re: Testing website from local network

Dougie I fail to understand your recommendations. I have <VirtualHost stockton.co.za:80 ServerName www.stockton.co.za ServerAdmin alf@stockton.co.za DocumentRoot /var/www/html/stockton ServerAlias stockton.co.za ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Inc...
by stockton
Fri Feb 28, 2020 8:51 am
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Re: Testing website from local network

I have altered my ports.conf from Listen 80 to Listen stockton.co.za:80 and on the next line Listen 192.168.0.100:80 and did a graceful restart but I still get to the router when attempting local connection.
by stockton
Fri Feb 28, 2020 7:16 am
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Re: Testing website from local network

Thank you, I tried that but that just gets me to the router not the server. I set up sites-available and sites-enabled and ran a2ensite and /etc/init.d/apache2 restart
by stockton
Fri Feb 28, 2020 7:08 am
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Re: Testing website from local network

Please tell me how I make it listen to both stockton.co.za:80(which is what it currently does) and 192.168.0.100:80?
by stockton
Thu Feb 27, 2020 5:08 pm
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Re: Testing website from local network

stockton.co.za should now work correctly.
by stockton
Thu Feb 27, 2020 4:32 pm
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Re: Testing website from local network

That is interesting as stockton.co.za/lcars should have asked for authorization and if you clicked on the right of that screen you should have got further.
On the other hand another test has successfully got to stockton.co.za but not stockton.co.za/lcars
by stockton
Thu Feb 27, 2020 3:46 pm
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Re: Testing website from local network

Were you using http://stockton.co.za ? or http://stockton.co.za/lcars ? The shtml does exist.
by stockton
Thu Feb 27, 2020 12:51 pm
Forum: Networking and servers
Topic: Testing website from local network
Replies: 16
Views: 945

Testing website from local network

I have a website www.stockton.co.za working fine from the internet but as I am altering it I wish to access it from my internal network but cannot. If, from my development machine, I browse to 192.168.0.100/stockton I get a 404 496 error whereas I am sure if you try you can access it. /var/www/html/...
by stockton
Tue Feb 25, 2020 12:50 pm
Forum: Python
Topic: Python crc16 AttributeError: 'int' object has no attribute 'to_bytes'
Replies: 5
Views: 1478

Re: Python crc16 AttributeError: 'int' object has no attribute 'to_bytes'

After reinstalling crc16 as python3 when I python3 solar2.py I get #!/usr/bin/env python3Traceback (most recent call last): File "solar2.py", line 28, in <module> sendCommand(getCommand('QPI')) File "solar2.py", line 12, in sendCommand dev.ctrl_transfer(0x21, 0x9, 0x200, 0, cmd) ...
by stockton
Tue Feb 25, 2020 10:50 am
Forum: Python
Topic: Python crc16 AttributeError: 'int' object has no attribute 'to_bytes'
Replies: 5
Views: 1478

Python crc16 AttributeError: 'int' object has no attribute 'to_bytes'

I am attempting to implement python scrip to read my solar inverter. I am not a python programmer so please forgive silly questions. When I attempt code I get the following replies:- Traceback (most recent call last): File "solar2.py", line 28, in <module> sendCommand(getCommand('QPI')) Fi...
by stockton
Fri Feb 07, 2020 8:22 am
Forum: General discussion
Topic: Squirrelmail
Replies: 1
Views: 209

Re: Squirrelmail

However in squirrelmail.conf I see
$squirrelmail_default_language = 'en_US';
$default_charset = 'iso-8859-1';
Which is different to what I have in the OS.
Which is correct?

Go to advanced search