I neede help [on many levels!]

on-topic Acorn-related news and discussions not covered by the other forums
Post Reply
avtovaz
Posts: 47
Joined: Wed Jan 18, 2017 5:09 pm
Contact:

I neede help [on many levels!]

Post by avtovaz » Tue Oct 08, 2019 7:41 pm

I have a project in my mind that i want to do. How i go about it is making me think quite a bit as i dont know what can be done these days with little computers. I only know how to program BBC basic from when i was a kid, and would be my language of choice as itll take me a long time to learn any other language.

My bedroom is fairly large, it has 2 bay windows, both have small windows. Never had problems with mold in the house but since we got 2 new cats, and i keep the door closed most of the day as i dont want to find any presents in here.


So, forgetting that i have 2 sets of curtains [ i plan to control them later!!] , i have an idea. That is to pneumatically open and close my windows with a double acting linear actuators, controlled with 5 port 3 position valves. That then will be controlled with a 8 relay board, and in the windows will car rad fans. I basically want the windows to open and the fans to come one for 1 hour a week day when im not in to circulate the air, and a manual over ride.

Now, the pneumatic side of things is easy, i have a compressor in the garage, ill put a 1 way valve into a 20 ltr cylinder i have, to act as my accumulator, run some 6mm pipe threw my bedroom floor to the valves etc. To operate 1 window cycle will take next to no air, so the 20 ltr is massive overkill, but also it be charged every other day say anyway as i am restoring a mini atm. So that and the fans are almost done. Thats easy to me.



I just need now to control it. Im hoping i can do the following.

I have a desktop pc which i have connected to the internet via ethernet cable. Cable comes up from the hub downstairs, into a lan switch thing in my room, and ive got my pc connected to that and it is that i want to virtually program/control the pi with. I also will have the pi connected to the ethernet switch, [dont want to do it wirelessly] and the pi will live with the window control stuff. Over at the window control i have a pc power supply, it gives out constant 5v so i can power the pi from that. i ve got relays 1 to open window 1, 2 to close window 1, 3 to open window 2, 4 to close window 2, 5 to power window fan 1, 6 to power window fa 2, 7 for a 12v dehumidifier and 8 to wake up the power supply.


So now knowing the setup, can i program this some how in BBC basic?


Any pointers and comments please, i need all the help i can, doing it in C++ or python would take me ages to learn, and i still love BBC basic , id enjoy relearning it again.

thanks [-o<

User avatar
geraldholdsworth
Posts: 533
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: I neede help [on many levels!]

Post by geraldholdsworth » Wed Oct 09, 2019 11:59 am

Have you looked at control processors?

This sort of thing can be done with, for example, an AMX NI-3100. This also has 8 relays which can be used to control your actuators. Programming it uses a language called Netlinx, which is fairly similar to Basic (in fact, I think most modern languages are). The controller itself can be picked up fairly cheaply off Fleabay.

But, if you want to use the Pi, controlling the GPIO ports is fairly easy and there are modules available for RISC OS (and threads on this forum about it too).
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk

avtovaz
Posts: 47
Joined: Wed Jan 18, 2017 5:09 pm
Contact:

Re: I neede help [on many levels!]

Post by avtovaz » Wed Oct 09, 2019 9:01 pm

thankyou for the reply. The amx thing looks good, there is one not far away from me for not a lot, but i do really want to use the pi now. I was going to use an arduino, but the pi was a birthday present from my sisters husband, and also, i have a big love for BBC basic. So getting to know it again would be really nice.

I didnt know about modules, time has moved on so much since i last looked.

Ill have a search of the forum now, didnt think there would be much on here, but !!!

User avatar
helpful
Posts: 511
Joined: Tue Sep 22, 2009 12:18 pm
Location: London
Contact:

Re: I neede help [on many levels!]

Post by helpful » Thu Oct 10, 2019 1:50 am

There is a StrongHelp manual for using the GPIO module. I think it (module and help file) is in the standard RO Pi disc image, but if not get it from here - http://www.tankstage.co.uk/Software/

There are several threads over on the ROOL forum about using GPIO, e.g:

https://www.riscosopen.org/forum/forums/11/topics/11903
https://www.riscosopen.org/forum/forums/5/topics/1445

... although the currently most active thread is complaining about the documentation being awful!

Bryan.
RISC OS User Group Of London - http://www.rougol.jellybaby.net/
RISC OS London Show - http://www.riscoslondonshow.co.uk/

avtovaz
Posts: 47
Joined: Wed Jan 18, 2017 5:09 pm
Contact:

Re: I neede help [on many levels!]

Post by avtovaz » Thu Oct 10, 2019 6:27 pm

lol thanks!

i am now on the way to where i want to be going, i have installed risc os on the pi, worked out that by pressing f12 i can get to *basic and its really good.

i have found a basic overview and will be starting again from teh beginning.


thanks. Just need to keep working at it!

Post Reply