Go to advanced search

by bensimmo
Tue Apr 23, 2019 7:37 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

For a challenge, you could always improve GMP for ARM or start a RISC-V optimisation.
No need to touch BASIC.
https://gmplib.org/devel/
by bensimmo
Tue Apr 23, 2019 1:34 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

I don't know the ins and out or even and I'm not a decent programmer, but if C can't use GMP, then do you need to check all the Higher Level's for using it in their language, has Python used it for its libraries?
by bensimmo
Tue Apr 23, 2019 12:10 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

edit / seems it's printing them out to different lengths, hum. the same code though. Doh!, my bad. looking at the terminal window of VS Code, not the debug. All is right with the world if you look at the correct tab. Windows is quite slow though, in Windows 10 Python installs VS Code Python 3.5.2 is...
by bensimmo
Tue Apr 23, 2019 10:40 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

Also do we have a solution? I just ran the python code (in the github) and with 3.5.2 32bit on Visual Code (Win10) it gives a different answer to 3.7.3 32bit on Visual Code (Win10) and with Python 3.7.3 64 bit (Win10 - WSL : Ubuntu Disco) it's different again. Just to note, each one is consistent w...
by bensimmo
Tue Apr 23, 2019 9:40 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

*with python many parts are there as standard but you still need to import them, so import maths , is that allowed ?) Python has no proper standard (e.g. ISO or ECMA) so its not clear how to proceed. "de-facto" standards (such as using GMP in C) are not permitted. Python Standard Library https://do...
by bensimmo
Tue Apr 23, 2019 9:31 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

Also do we have a solution?

I just ran the python code (in the github) and with 3.5.2 32bit on Visual Code (Win10) it gives a different answer to 3.7.3 32bit on Visual Code (Win10)
and with Python 3.7.3 64 bit (Win10 - WSL : Ubuntu Disco) it's different again.
by bensimmo
Tue Apr 23, 2019 9:12 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

Can I do a TL:DR Fibo 478496 9 challenge is Pick a language. Print a part of the solution to (last so many digits) show it works remove the print, Time it with Linux bash, preferably on a standard Pi3/Pi3+ and also your own computer base the code on Fast Doubling part here https://www.nayuki.io/pag...
by bensimmo
Tue Apr 23, 2019 9:01 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

... hippy_fibo (Python port) fiboA = 0 fiboB = 0 function Fibonacci(n) if n then Fibonacci(n \ 2) if n and 1 then t = fiboA + fiboA + fiboB fiboA *= t fiboB *= t if (n and 3) = 1 then fiboA += 1 else fiboA -= 1 end if else t = fiboB + fiboB - fiboA fiboA *= t fiboB *= t if n and 3 then fiboB += 1 e...
by bensimmo
Mon Apr 22, 2019 5:11 pm
Forum: HATs and other add-ons
Topic: Usb dvb
Replies: 18
Views: 397

Re: Usb dvb

Try the latest release of OpenElec / TV nuHeadend: https://openelec.tv/downloads https://openelec.tv/documentation/configuration/configuring-tvheadend this is an option but I want to use it raspbian os for other tasks You can put the tv headon on to raspbian os and still do other things with raspbi...
by bensimmo
Sun Apr 21, 2019 7:16 pm
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

Why not just use the Pi, Squeaks on there in the Desktop download by default.
Seems an easier way to play with it.

You could even add it to Scratch ?
Or try do it all in Scratch?

Edit. A funny autocorrect.
by bensimmo
Sun Apr 21, 2019 12:20 pm
Forum: Beginners
Topic: Using Sensor and Pi outside
Replies: 22
Views: 391

Re: Using Sensor and Pi outside

Also check if the sensor needs some burn in time good resource on the sensor https://www.waveshare.com/mq-135-gas-sensor.htm (unless you have a direct to the sensor itself setup, your link doesn't work for me and you will need 5V, I'm so used to buying wide range voltage devices 2.7 to 5V sort of th...
by bensimmo
Sun Apr 21, 2019 12:12 pm
Forum: Beginners
Topic: Using Sensor and Pi outside
Replies: 22
Views: 391

Re: Using Sensor and Pi outside

Just adding to say GPIOZERO can now be used for this as far as I can see https://gpiozero.readthedocs.io/en/stable/api_spi.html#mcp3008 and will be similar to temp, just with the MQ135 calibration https://gpiozero.readthedocs.io/en/stable/recipes.html#measure-temperature-with-an-adc The MQ135 should...
by bensimmo
Fri Apr 19, 2019 2:56 pm
Forum: Off topic discussion
Topic: Microsoft buys Express Logic
Replies: 5
Views: 243

Re: Microsoft buys Express Logic

Could be a good move, with MS's push to open thing up and use and contribute to open source now.

Who knows, it'll certainly be to get used with 'cloud' which is where their money is.
by bensimmo
Fri Apr 19, 2019 2:54 pm
Forum: HATs and other add-ons
Topic: Usb dvb
Replies: 18
Views: 397

Re: Usb dvb

The new testing Linux kernel may have support in it.

Best (or easiest for me) was to use LibreElec and TVHeadend and see if it picked it up.
It also has two other methods of getting a driver.
by bensimmo
Fri Apr 19, 2019 2:52 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: RPDesktop on Buster ?
Replies: 9
Views: 157

Re: RPDesktop on Buster ?

Yes, we follow the appropriate mailing lists. Despite being in freeze, our packages still get bumped by newer versions and there are still plenty of packages left to port across. Is the plan to release a dual 32/64 bit desktop or stick to the 32 bit desktop (ignoring the kernel as that seems to be ...
by bensimmo
Fri Apr 19, 2019 2:49 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: RPDesktop on Buster ?
Replies: 9
Views: 157

Re: RPDesktop on Buster ?

The short version would be that we are still working on Buster. Rebuilding for x86 at this point wouldn't be worth it because things will still change a lot before the release. That's fair and what I expected, I'll look at alternatives to use or may just go back as the new release will have all the...
by bensimmo
Thu Apr 18, 2019 5:24 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: RPDesktop on Buster ?
Replies: 9
Views: 157

Re: RPDesktop on Buster ?

x86 :-) (For any reference, HP G70 Core2DuoT5800/nvidiaGPU) Hence the forum section, but I know it's worth the check. I even refrained very hard from saying RaspbianX86 I have right click menu at the moment so nothing is urgent (unless others start updating to buster, like my curious self). It's not...
by bensimmo
Thu Apr 18, 2019 4:35 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: RPDesktop on Buster ?
Replies: 9
Views: 157

RPDesktop on Buster ?

Has anyone got RaspberryPi Desktop on Buster running. It seems to rely on something it can no longer have in buster so refuses to do it. (For the record I updated a RPD Stretch to Buster via apt via good old change any reference to stretch to buster). Python is working much faster as is my laptop no...
by bensimmo
Thu Apr 18, 2019 11:22 am
Forum: Beginners
Topic: Using GPIOZERO instead of Rpi.GPIO
Replies: 1
Views: 52

Re: Using GPIOZERO instead of Rpi.GPIO

Gpiozero is a bit like a nice wrapper around the gpio interfaces, making life easy.

Reading this may give some idea,
https://gpiozero.readthedocs.io/en/stab ... igpio.html
by bensimmo
Wed Apr 17, 2019 6:54 pm
Forum: Python
Topic: Updating Scipy 0.18 version to 1.2.1
Replies: 2
Views: 50

Re: Updating Scipy 0.18 version to 1.2.1

sudo pip install --upgrade scipy (for Python2.7)
sudo pip3 install --upgrade scipy ( for Python3)



Not sure if you'll need to purge it from apt first.
sudo apt purge python-scipy python3-scipy
by bensimmo
Wed Apr 17, 2019 6:44 pm
Forum: Python
Topic: How to save GPS Data to a text file?
Replies: 12
Views: 201

Re: How to save GPS Data to a text file?

That's all covered in the SenseHAT data logger. I would recommend using pynmea2 to parse the serial stream (Also use /dev/serial0 then it'll always point to the UART pins even if you change to a none WiFi Pi or disable Bluetooth etc). You then just loop, parse, save to CSV, on the serial read That's...
by bensimmo
Wed Apr 17, 2019 10:01 am
Forum: Python
Topic: How to save GPS Data to a text file?
Replies: 12
Views: 201

Re: How to save GPS Data to a text file?

Learn a bit of Python3 and a good way to do this and work out what you need to do is work your way through this project tutorial. https://projects.raspberrypi.org/en/projects/sense-hat-data-logger It's a datalogger (which is what you are doing ) but for the SenseHAT. Best part is you don't need a Se...
by bensimmo
Tue Apr 16, 2019 4:38 pm
Forum: General discussion
Topic: anemometer - how to 'average' readings
Replies: 17
Views: 455

Re: anemometer - how to 'average' readings

As a bit more help,
You may well want to work your way through this as needed.
https://projects.raspberrypi.org/en/pro ... er-station

It'll give you neater code and Wind Speed and Gust are in there.
You might be able to jump directly to that part.
by bensimmo
Mon Apr 15, 2019 10:32 am
Forum: Off topic discussion
Topic: Why Avoid BASIC on RPi?
Replies: 2051
Views: 75711

Re: Why Avoid BASIC on RPi?

Special? The Pi in RaspberryPi is for Python. Mainly as the choice of language that school children would be using. It is/(was and even more so) the go to beginners text only language. TBH not strictly true. I suppose Pi could in a small way relate to Python, but there are other reasons. True. As E...
by bensimmo
Sat Apr 13, 2019 5:20 pm
Forum: Raspbian
Topic: getting gps to work on raspberry pi 3
Replies: 23
Views: 681

Re: getting gps to work on raspberry pi 3

Sorry, basically it needs about 30mins outside, near a window to get its first fix, it should be quicker after that. You would need Ublox8 style for a lock indoors (or better chance of one) compared.to the ublox6 you have. cgps stops if it doesn't have a lock, gpsmon will normally keep on going. It ...

Go to advanced search