Go to advanced search

by hippy
Mon Jun 17, 2019 8:10 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

I like the RPi as it forces the developer to be creative and not just throw more hardware at it to hide poor design. I suppose one could split the users I mentioned outside of industry into consumers ( surfers, gamers and streamers ), developers ( makers and programmers ), and learners. For the con...
by hippy
Mon Jun 17, 2019 7:30 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

I'm still trying to get my arms around what is the predominant use of the Raspberry Pi. With half of all Pi computers sold going into industry its main use could be defined as embedded controller. Outside that its main use I would say it is as a cheap Linux computer. It's used as a desktop replacem...
by hippy
Mon Jun 17, 2019 6:27 pm
Forum: Beginners
Topic: Ken's Labyrinth for linux
Replies: 12
Views: 232

Re: Ken's Labyrinth for linux

sudo apt-get install libsdl2-dev libsdl2-image-dev Thanks for that. It now builds for me, I can use ./ken and get the setup screen, but things go pear-shaped after that. wget http://s3.jspenguin.org/LAB3D-SDL-3.0-src.tar.gz tar -zxvf LAB3D-SDL-3.0-src.tar.gz cd LAB3D-SDL-3.0 sudo apt-get install li...
by hippy
Mon Jun 17, 2019 4:27 pm
Forum: General discussion
Topic: using Engergenie sockets with PIR motion Sensors
Replies: 2
Views: 66

Re: using Engergenie sockets with PIR motion Sensors

Energenie seem to supply datasheets for their products and those should reveal which pins are used and which remain available. Energenie tech support may be able to tell you if the dastasheets do not. You can connect other things to the Pi by soldering directly to the header pins underneath the boar...
by hippy
Mon Jun 17, 2019 3:23 pm
Forum: Troubleshooting
Topic: Espeak alsa issue
Replies: 5
Views: 129

Re: Espeak alsa issue

For applications like this I tend to build from source rather than apt install. Thanks for ther pointer. That worked for me, though I also stopped short of installing it - sudo apt-get install make autoconf automake libtool pkg-config git clone https://github.com/espeak-ng/espeak-ng.git cd espeak-n...
by hippy
Mon Jun 17, 2019 2:55 pm
Forum: Beginners
Topic: Ken's Labyrinth for linux
Replies: 12
Views: 232

Re: Ken's Labyrinth for linux

Is there some kind of generic guide to building things on raspbian? Or is this way easier than I think possibly? In my experience it's either simple or a journey through various 'circles of hell'. A lot depends on how well the installation process has been documented, whether for a Pi or something ...
by hippy
Mon Jun 17, 2019 1:47 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

I think it would be just as problematic with an IDE. Beyond the ongoing problem of ScriptBasic documentation, information and support being all over the place, with much of what there is outdated and no longer applicable, the main issue is getting ScriptBasic installed, up and running. There is no "...
by hippy
Mon Jun 17, 2019 1:08 pm
Forum: General discussion
Topic: can RPI-Zero work as RNDIS gadget while same time accepting USB mouse
Replies: 3
Views: 117

Re: can RPI-Zero work as RNDIS gadget while same time accepting USB mouse

There may be some means to do it using two Zeroes connected via their UART's, one as a USB host the other as a USB gadget.

There are also some 'USB host module' boards which it may be possible to connect to a Pi.
by hippy
Mon Jun 17, 2019 1:03 pm
Forum: Automation, sensing and robotics
Topic: Let's give voice to my robot... Speaker problem
Replies: 9
Views: 239

Re: Installing OpenCV

Just buy a piezo speaker w/ 32ohm and connect the gpios No; don't do that or you'll burn out the GPIO pin. You either need to use a high impedance piezo to limit current drawn, which means it will be quiet. Or you need an amplifier which allows more current through that piezo which makes it louder....
by hippy
Mon Jun 17, 2019 12:45 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 530
Views: 13931

Re: A Final Fibonacci Challenge

Heater wrote:
Mon Jun 17, 2019 12:44 pm
The hfibo.sb posted above is derived from my Javascript version. It is recursive.

The 1milfibo.sb above is from Airr apparently. It is iterative. That is the one I'm puzzling over
I presumed that was the un-rolled, non-recursive, optimised version. But I may be wrong.
by hippy
Mon Jun 17, 2019 12:40 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 530
Views: 13931

Re: A Final Fibonacci Challenge

Anyone know where that 1milfibo.sb algorithm comes from? In terms of algorithmic expressiveness that scores almost zero. It's as impenetrable as if it were written in assembler. I thought it was derived from the JavaScript you presented - https://www.raspberrypi.org/forums/viewtopic.php?f=31&t=2402...
by hippy
Mon Jun 17, 2019 12:04 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

the "cleanup" branch has been merged into "master", so please use the master branch going forward. Thanks for the update. Building on my Pi from the sb-dev-master.zip seems to have worked using the same process I used to build from the sb-dev-cleanup.zip, with just one issue - MODULE sdbg: dll OK l...
by hippy
Mon Jun 17, 2019 1:20 am
Forum: Other projects
Topic: Wire GPIO into remote control PCB?
Replies: 7
Views: 179

Re: Wire GPIO into remote control PCB?

If I could throw on an RF transmitter with the protocols that would be awesome, but tricky It might not be too hard depending on what your experience is. It is possible to see what comes out of the transmitter or out of the receiver in the switch and determine the protocol used, replicate sending t...
by hippy
Sun Jun 16, 2019 5:38 pm
Forum: Troubleshooting
Topic: Espeak alsa issue
Replies: 5
Views: 129

Re: Espeak alsa issue

may be you should try following the tutorial here to get espeak working. https://www.dexterindustries.com/howto/make-your-raspberry-pi-speak/ espeak "Hello World" 2>/dev/null And all I get is silence. I suspect the 2> is simply hiding the numerous errors one gets without it. I have never managed to...
by hippy
Sun Jun 16, 2019 5:12 pm
Forum: Other projects
Topic: Wire GPIO into remote control PCB?
Replies: 7
Views: 179

Re: Wire GPIO into remote control PCB?

Sending RF to control remote mains switches is easy enough to do with just a dumb RF transmitter so long as one knows the protocol being used. It can be done with a simple microcontroller and a Pi should work if it can generate the required RF bit-stream with accurate enough timing. Another option m...
by hippy
Sun Jun 16, 2019 3:26 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

Somehow I knew this was going to be a world of pain: That about sums up ScriptBasic. What to do? No idea. I'm not a Linux or ScriptBasic expert. We are far away from an out of the box experience here... This works 'out of the box' for me on my Pi, and, yes I know there's probably a better way to do...
by hippy
Sun Jun 16, 2019 2:18 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

In my "gpio.bas" extension I have ... GLOBAL CONST ALT_OUTPUT = 1 But when I run ... IMPORT gpio.bas PRINT gpio::ALT_OUTPUT, "\n" That reports it as an "undef". How do I export a named constant out of an extension ? Solved: Don't include the GLOBAL. If one does it becomes available in the main progr...
by hippy
Sun Jun 16, 2019 1:25 pm
Forum: Python
Topic: Importing python code from a sub-folder
Replies: 4
Views: 139

Re: Importing python code from a sub-folder

I managed to do that. What I mean is that when I am running the read_sensors.py code I can't import the write_to_db.py which is in another directory. So what you were hoping for is, within "./read_sensors/read-sensors.py" you could have ... import ../../write_to_db.write_sensor as write def DoRead(...
by hippy
Sun Jun 16, 2019 1:14 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

ScriptBasic wrote:
Sat Jun 15, 2019 7:19 pm
Hippy,

How close are you to releasing the code for your GPIO interface? I would like to give it a try on ScriptBasic.
My latest version is attached.
sb-gpio.tar.gz
(13.27 KiB) Downloaded 12 times
by hippy
Sun Jun 16, 2019 12:44 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

Don't know if this helps, but on my Pi, with an extension created as "~/sb-dev-cleanup/extensions/gmp2", this is what I have to build it and then make that library available for scriba to use - cd ~/sb-dev-cleanup ./setup --module=gmp2 cp ./bin/mod/dll/gmp2.so /usr/local/lib/scriba/gmp2.so cp ./exte...
by hippy
Sat Jun 15, 2019 5:39 pm
Forum: Python
Topic: Importing python code from a sub-folder
Replies: 4
Views: 139

Re: Importing python code from a sub-folder

Which Python are you using ? This works for me using Python 3 - ./main.py import read_sensors.read_sensors as read import write_to_db.write_sensor as write read.DoRead() write.DoWrite() ./read_sensors/read_sensors.py def DoRead(): print("Inside ./read_sensors/read_sensors.py:DoRead") ./write_to_db/w...
by hippy
Sat Jun 15, 2019 12:22 pm
Forum: General discussion
Topic: Turn RPi 3 on with remote?
Replies: 13
Views: 370

Re: Turn RPi 3 on with remote?

Which reminds me, isn't there some HDMI protocol which can turn supported devices on and off when the TV is switched on and off? Could the Pi be configured to use this? No, not without external hardware. I am not sure if the Pi can receive CEC or whatever through HDMI but, even if it could, when po...
by hippy
Sat Jun 15, 2019 12:14 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1082
Views: 26415

Re: ScriptBasic

I'm surprised @hippy was able to get ScriptBasic polling native at 5 us. I went ahead and created the C BitStreamRead function when I was told SB was too slow to sample data. At the time no one knew what ScriptBasic was capable of, could only judge by what results you were getting. This is the resu...
by hippy
Sat Jun 15, 2019 12:05 pm
Forum: Automation, sensing and robotics
Topic: Let's give voice to my robot... Speaker problem
Replies: 9
Views: 239

Re: Let's give voice to my robot... Speaker problem

A high impedance piezo speaker may make some noise, but unlikely. Indeed. It did work when audio PWM is also directed to a GPIO pin and the piezo placed across the pin and 0V was but was extremely quiet. That should be improved upon by using a MAX 232 type serial buffer, turning 0V/3V3 to +10V/-10V...
by hippy
Sat Jun 15, 2019 11:41 am
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 530
Views: 13931

Re: A Final Fibonacci Challenge

This still returns zero for me. function hfibo(n) local a, b, fk, fk1, k, r split "0,0,0,0,0,0" by "," to k, a, b, r, fk, fk1 if n <= 2 then hfibo = 1 else ... end if hfibo = r end function It would wouldn't it. You are setting hfibo = r just before returning every time, and when n <= 2 it never se...

Go to advanced search