pi_amateur
Posts: 1
Joined: Sat Jan 20, 2018 11:12 pm

Easy Way to code Raspberry with blocks

Sat Jan 20, 2018 11:19 pm

Hello Everyone; in this topic i will talk about http://www.raspblocks.com/

Raspblocks is a code generator for Raspberry boards. You don’t need any coding skills to program it and make your projects.

Here is a Youtube tuorial Blink Led : https://www.youtube.com/edit?o=U&video_id=nNh3GG2TlEU

Link to Start Coding http://generator.raspblocks.com


Have Fun ;)

User avatar
DougieLawson
Posts: 32376
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Easy Way to code Raspberry with blocks

Sun Jan 21, 2018 5:33 pm

What does this give me that I don't already get with Scratch or Scratch2 (which are built-in to Raspbian)?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

mattmiller
Posts: 1818
Joined: Thu Feb 05, 2015 11:25 pm

Re: Easy Way to code Raspberry with blocks

Sun Jan 21, 2018 6:01 pm

If you try it out in the last link - it seems to generate runnable Python code

Very nice work :)

User avatar
DougieLawson
Posts: 32376
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Easy Way to code Raspberry with blocks

Sun Jan 21, 2018 6:05 pm

mattmiller wrote:
Sun Jan 21, 2018 6:01 pm
If you try it out in the last link - it seems to generate runnable Python code
As I said what does it give me that isn't in Scratch or Scratch2?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10487
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Easy Way to code Raspberry with blocks

Sun Jan 21, 2018 6:39 pm

DougieLawson wrote:
Sun Jan 21, 2018 6:05 pm
mattmiller wrote:
Sun Jan 21, 2018 6:01 pm
If you try it out in the last link - it seems to generate runnable Python code
As I said what does it give me that isn't in Scratch or Scratch2?
the answer is "runnable python code".
but even when it wouldn't, it gives us choices.

great work pi_amateur, and don't mind dougie, he can be a bit negative sometimes... :roll:

B.Goode
Posts: 5604
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Easy Way to code Raspberry with blocks

Sun Jan 21, 2018 6:51 pm

No harm in having other options.

Long standing forum member @AllAboutCode has a similar offering at http://edublocks.org/

The website for edublocks looks more polished to me, and it is capable of generating code for a micro:bit as well as for an RPi.

User avatar
DougieLawson
Posts: 32376
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Easy Way to code Raspberry with blocks

Sun Jan 21, 2018 7:56 pm

With so much pre-existing choice why do we need a new website to do the same stuff we can already do?

The proliferation of programming languages is one of the great problems with the software industry. We've got a wheel that's already had the corners knocked off, why do we need snow tyres when it's not snowing? Do we really need a re-spin of an existing thing every week?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
scruss
Posts: 1644
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Easy Way to code Raspberry with blocks

Sun Jan 21, 2018 9:52 pm

Yes, yes we do. Because some tools work better for some people. I've been having quite a bit of fun using Blocks with a micro:bit, so I really want to give this a shot. But I've also seriously tried shell scripting in PostScript¹, something I don't think anyone else would even want to try or use even if they had to.

I mean, I check the Days Since Last JavaScript Framework site frequently. I know it's absurd. But there are sometimes some neat ideas that come out.

¹: PostScript: a page-description language notable for using stack-based notation and mixing code and data all in the one stream, but it can be coerced into doing file operations. You've probably got the GhostScript (gs) PostScript interpreter installed on your Raspberry Pi already. The tiny PS program ‘1 1 10 { == } for’ will print the numbers 1…10. Adobe's PostScript Language Tutorial & Cookbook (search for "adobe blue book") is freely available if anyone feels like trying this somewhat niche language.

Update: seems I accidentally linked to a js bitcoin mining site. Sorry about that; link removed. Was hoping to find the cartoon of the same name.
Last edited by scruss on Sun Jan 21, 2018 11:33 pm, edited 2 times in total.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

Heater
Posts: 8987
Joined: Tue Jul 17, 2012 3:02 pm

Re: Easy Way to code Raspberry with blocks

Sun Jan 21, 2018 10:24 pm

scruss,

Please don't link us to pages that run coin mining javascript in our browsers. Especially when they are otherwise useless.
...PostScript¹, something I don't think anyone else would even want to try or use even if they had to.
Ha! I did. First time I ever had access to a laser printer. A great big office printer back in 1980 something. Actual work stopped for a few days as I had to check out this weird PostScript thing. Managed to make some quite funky graphics with it.

Never again....

User avatar
scruss
Posts: 1644
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Easy Way to code Raspberry with blocks

Mon Jan 22, 2018 12:02 am

pi_amateur wrote:
Sat Jan 20, 2018 11:19 pm
Hello Everyone; in this topic i will talk about http://www.raspblocks.com/
Nice work! It even ran on my Pi Zero over VNC.

In the Blink example — http://www.raspblocks.com/blink.html — you might want to change the 500 second blink delay down to 1. I don't really want to wait 8' 20" between blinks.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

procount
Posts: 1063
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Easy Way to code Raspberry with blocks

Mon Jan 22, 2018 9:50 am

The Ultrasonic distance measurement code looks very similar to your pwm code.....
You might want to correct that.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

User avatar
bensimmo
Posts: 2621
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Easy Way to code Raspberry with blocks

Mon Jan 22, 2018 1:17 pm

DougieLawson wrote:
Sun Jan 21, 2018 6:05 pm
mattmiller wrote:
Sun Jan 21, 2018 6:01 pm
If you try it out in the last link - it seems to generate runnable Python code
As I said what does it give me that isn't in Scratch or Scratch2?
Scratch 3 is due out, testing versions should be due out shortly (end of January iirc from the Twitter post).
Just to add another one ;-)


Though these 'blocks' should all be accessible to anyone that has used blocks based, or scratch, before.
Google App creater uses the same basis.

User avatar
bensimmo
Posts: 2621
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Easy Way to code Raspberry with blocks

Mon Jan 22, 2018 1:26 pm

pi_amateur wrote:
Sat Jan 20, 2018 11:19 pm
Hello Everyone; in this topic i will talk about http://www.raspblocks.com/

Raspblocks is a code generator for Raspberry boards. You don’t need any coding skills to program it and make your projects.

Here is a Youtube tuorial Blink Led : https://www.youtube.com/edit?o=U&video_id=nNh3GG2TlEU

Link to Start Coding http://generator.raspblocks.com


Have Fun ;)
My opinion is you should move from the RPI.GPIO backend to the GpioZero module instead.
They use easy to access blocks of code that should be transferable pretty easily.
As things come along adding more should be simple, that and it gives you a target of devices you can aim for.

Plus you'll be able to switch to pinfactories and pigpio easily and remotely program from another device to the Pi.
e.g. the x86 desktop to the PiZ


Your site doesn't work very well at all on a mobile device.

Nice to see how it progresses :-)

ejolson
Posts: 1444
Joined: Tue Mar 18, 2014 11:47 am

Re: Easy Way to code Raspberry with blocks

Mon Jan 22, 2018 5:47 pm

mattmiller wrote:
Sun Jan 21, 2018 6:01 pm
If you try it out in the last link - it seems to generate runnable Python code
One of the difficulties observed with Scratch is that students get stuck and never make the transition from a picture-based programming environment to a written one. From a computer literacy point of view, being able to use a written language is important. It seems likely that being able to generate equivalent Python code would significantly reduce the barriers that prevent some students from making the transition.

As an aside, my brother just started an introduction to programming course in college. The first week they used a flow-charting system that could output Python, C++, JavaScript and many others to compare how similar the same algorithm looks in the different programming languages.

mattmiller
Posts: 1818
Joined: Thu Feb 05, 2015 11:25 pm

Re: Easy Way to code Raspberry with blocks

Mon Jan 22, 2018 8:06 pm

As an aside, my brother just started an introduction to programming course in college. The first week they used a flow-charting system that could output Python, C++, JavaScript and many others to compare how similar the same algorithm looks in the different programming languages.
That's a good idea :)

Heater
Posts: 8987
Joined: Tue Jul 17, 2012 3:02 pm

Re: Easy Way to code Raspberry with blocks

Mon Jan 22, 2018 8:24 pm

ejolson,
...they used a flow-charting system that could output Python, C++, JavaScript and many others to compare how similar the same algorithm looks in the different programming languages.
I would love to see the output of said flow-charting system.

I can imagine that any traditional flow chart design looks much the same in any traditional programming language. Give or take the syntactic differences.

But Javascript is based on an asynchronous, event driven programming model. Not something that is amenable to a typical flow chart design.

mattmiller
Posts: 1818
Joined: Thu Feb 05, 2015 11:25 pm

Re: Easy Way to code Raspberry with blocks

Mon Jan 22, 2018 9:02 pm

But Javascript is based on an asynchronous, event driven programming model.
I just call it witchcraft!

ejolson
Posts: 1444
Joined: Tue Mar 18, 2014 11:47 am

Re: Easy Way to code Raspberry with blocks

Tue Jan 23, 2018 12:24 am

Heater wrote:
Mon Jan 22, 2018 8:24 pm
I would love to see the output of said flow-charting system.
I think he said it was called flowgorithm. I haven't tried it. I think they were only using it for a week or so to get started thinking about what computers do and how--a sort of educational icebreaker so that students can get involved right away. It's currently only available for Microsoft Windows. It would be interesting if a version for Raspberry Pi were ever released.

asandford
Posts: 1990
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Easy Way to code Raspberry with blocks

Tue Jan 23, 2018 1:04 am

Heater wrote:
Mon Jan 22, 2018 8:24 pm

But Javascript is based on an asynchronous, event driven programming model. Not something that is amenable to a typical flow chart design.
Ironically, Node-red is very good at being a batch scheduler with exception handling (although the scipts I run are shell scripts).

asandford
Posts: 1990
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Easy Way to code Raspberry with blocks

Tue Jan 23, 2018 1:06 am

mahjongg wrote:
Sun Jan 21, 2018 6:39 pm
don't mind dougie, he can be a bit negative sometimes... :roll:
Understatement of the year

Heater
Posts: 8987
Joined: Tue Jul 17, 2012 3:02 pm

Re: Easy Way to code Raspberry with blocks

Tue Jan 23, 2018 9:13 am

node-red is very different from the traditional idea of flow charts as presented by flowgorithm and other block structured programming tools.

Flow charts are all about the control flow of a program. With their diagramatic representations of expressions, decision statements, loops, etc.

node-red is a picture of data flows.

It's not clear to me how a flowcharting tool, or these new block based attempts, can produce sensible Javascript code.

hippy
Posts: 2875
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Easy Way to code Raspberry with blocks

Tue Jan 23, 2018 9:38 am

Heater wrote:
Tue Jan 23, 2018 9:13 am
node-red is very different from the traditional idea of flow charts as presented by flowgorithm and other block structured programming tools.

Flow charts are all about the control flow of a program. With their diagramatic representations of expressions, decision statements, loops, etc.

node-red is a picture of data flows.

It's not clear to me how a flowcharting tool, or these new block based attempts, can produce sensible Javascript code.
I think you are confusing how node-red uses Javascript, leverages and enhances it and what Javascript is. Javascript can be used as an entirely traditional procedural language.

Windows Script Host (WSH) used to run traditional Javascript programs. Many Block-style editors produce Javascript code. It is perfectly possible to have event driven Javascript in Block-style programming.

ExpertDeveloper
Posts: 2
Joined: Fri Dec 22, 2017 12:20 pm
Contact: Website

Re: Easy Way to code Raspberry with blocks

Tue Jan 23, 2018 11:34 am

Correct Node-red is a good batch scheduler and has the exception handling feature.
App Developer

asandford
Posts: 1990
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Easy Way to code Raspberry with blocks

Wed Jan 24, 2018 2:01 am

Heater wrote:
Tue Jan 23, 2018 9:13 am
node-red is very different from the traditional idea of flow charts as presented by flowgorithm and other block structured programming tools.

Flow charts are all about the control flow of a program. With their diagramatic representations of expressions, decision statements, loops, etc.

node-red is a picture of data flows.

It's not clear to me how a flowcharting tool, or these new block based attempts, can produce sensible Javascript code.
I have no idea what node-red does 'behind the scenes', but I use it as a scheduler like Autosys ~2007 (I've not used that since), and it's very much cheaper

asandford
Posts: 1990
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Easy Way to code Raspberry with blocks

Wed Jan 24, 2018 2:25 am

asandford wrote:
Wed Jan 24, 2018 2:01 am
Heater wrote:
Tue Jan 23, 2018 9:13 am
node-red is very different from the traditional idea of flow charts as presented by flowgorithm and other block structured programming tools.

Flow charts are all about the control flow of a program. With their diagramatic representations of expressions, decision statements, loops, etc.

node-red is a picture of data flows.

It's not clear to me how a flowcharting tool, or these new block based attempts, can produce sensible Javascript code.
I have no idea what node-red does 'behind the scenes', but I use it as a scheduler like Autosys ~2007 (I've not used that since), and it's very much cheaper
In my mind a program flow chart is a data flow chart

Return to “Other languages”

Who is online

Users browsing this forum: No registered users and 2 guests