Ecoste
Posts: 2
Joined: Tue Mar 20, 2012 10:06 pm

Re: Some questions...

Tue Mar 20, 2012 10:24 pm

Can it run java? (I assume Yes(Would it be efficient with JVM?))

What software can you use to control the GPIOs.(Or you do it in the programming language itself??)

What can you use GPIOs for?(Can you use it for motors, sensors, led`s, sensors??)

I just want to get some clarification if I am right on my assumptions :3

Thanks for reading, yes I have googled, not much info that I could understand was given.

User avatar
mkopack
Posts: 242
Joined: Mon Nov 07, 2011 8:46 pm

Re: Some questions...

Tue Mar 20, 2012 11:28 pm

This is all in the FAQ's... but:

Yes it will run Java, but big stuff is going to end up being slow due to the limited RAM. You'll need to install the JDK package.

The GPIO's can be done a number of ways.. From basic file writes/reads, to Python interfaces.

Can use GPIO for everything you listed and more.

Ecoste said:


Can it run java? (I assume Yes(Would it be efficient with JVM?))

What software can you use to control the GPIOs.(Or you do it in the programming language itself??)

What can you use GPIOs for?(Can you use it for motors, sensors, led`s, sensors??)

I just want to get some clarification if I am right on my assumptions :3

Thanks for reading, yes I have googled, not much info that I could understand was given.


Ecoste
Posts: 2
Joined: Tue Mar 20, 2012 10:06 pm

Re: Some questions...

Wed Mar 21, 2012 12:02 am

Thanks for answering. I guess you would never know until you try to run JVM on the machine. Its pretty RAM intensive sadly. And I"m not too excited for learning Python ):

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22713
Joined: Sat Jul 30, 2011 7:41 pm

Re: Some questions...

Wed Mar 21, 2012 7:59 am

Well, there are many other languages supported, although Python doesn't seem to be that hard.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

pandapi
Posts: 120
Joined: Tue Feb 28, 2012 6:58 am

Re: Some questions...

Wed Mar 21, 2012 9:12 am

I'm a java developer by trade and despite the fact its quite different from java i found python to be most useful/enjoyable/easy/fast/lightweight.

Phil Spiegel
Posts: 210
Joined: Tue Jan 17, 2012 8:17 am
Contact: Website

Re: Some questions...

Wed Mar 21, 2012 9:46 am

Does someone who is familiar with both, know how Python compares to BBC Basic in its graphic drawing/plotting capabilites and also ability to include assembler sections?

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Some questions...

Wed Mar 21, 2012 10:24 am

Graphically, if you use pyGame, they are fairly similar.

Assembler code cannot be included directly in a Python program the way it can in BBC Micro Basic. (That feature is unique to BBC Basic. Not even the Spectrum had it.) Assembler code can be included in a Python project.

Ten years ago I was writing lots of assembler code. Now, in the same job with the same requirements, I very rarely touch it. Educationally it is useful and in some niche jobs it is still required. To my mind the educational aspect could be taught with microcontrollers better than trying to teach the language of a complex beast like the ARM or the x86.

chorlton
Posts: 50
Joined: Mon Feb 06, 2012 1:57 pm

Re: Some questions...

Wed Mar 21, 2012 10:59 am

mkopack said:



Yes it will run Java, but big stuff is going to end up being slow due to the limited RAM. You'll need to install the JDK package.


Technically you should only need a JRE (Runtime Environment) package to run Java which is smaller than the JDK at least in terms of download and installation. You should only need a JDK (Development Kit) if you want to compile your own programs on the Pi. The 'beauty' of Java being the ability to develop write-once-run-anywhere.... Ha Ha Ha Ha.

Sun developed something called CVM which is a lightweight, stripped-down Java virtual machine supporting the J2ME specification. It doesn't offer the full library support of a standard J2SE JRE but could still be useful. Plus I know it ran on ARMv5 so may be avaialble for later ARM chips.

http://developers.sun.com/mobi.....ns/vmdiff/

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4098
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: Some questions...

Wed Mar 21, 2012 2:03 pm

rurwin said:



(That feature is unique to BBC Basic. Not even the Spectrum had it.)


no it wasn't the Camputers Lynx BASIC while not as extensive support had the ability to include assembler in it and also had a builtin machine code monitor/debugger AND floating point line numbers

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22713
Joined: Sat Jul 30, 2011 7:41 pm

Re: Some questions...

Wed Mar 21, 2012 2:40 pm

The compiler we use on the Videocore can have inline assembler - originally Metaware I think.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

mole125
Posts: 228
Joined: Tue Jan 10, 2012 2:01 pm

Re: Some questions...

Wed Mar 21, 2012 2:45 pm

JamesH said:


The compiler we use on the Videocore can have inline assembler - originally Metaware I think.


VideoCore is written in BASIC???

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Some questions...

Wed Mar 21, 2012 2:49 pm

Of course it is. Proper BASIC has matrix operations built-in, unlike C, Java, Assembler or even FORTRAN. It also has procedure calls with the lowest overhead of any language.

It would be possible to use APL, but the staff churn would be unacceptable..


jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22713
Joined: Sat Jul 30, 2011 7:41 pm

Re: Some questions...

Wed Mar 21, 2012 2:51 pm

mole125 said:


JamesH said:


The compiler we use on the Videocore can have inline assembler - originally Metaware I think.


VideoCore is written in BASIC???


RTL and C with lots of custom vector assembler. If you really wanted to know.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
Gert van Loo
Posts: 2482
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Some questions...

Wed Mar 21, 2012 4:38 pm

No, it is written in verilog. But we use a lot of scripts and even some C-programs on the database before and after synthesis as well as during and after layout.

Smartybones
Posts: 176
Joined: Wed Feb 08, 2012 5:03 pm

Re: Some questions...

Wed Mar 21, 2012 5:41 pm

rurwin said:


Assembler code cannot be included directly in a Python program the way it can in BBC Micro Basic. (That feature is unique to BBC Basic. Not even the Spectrum had it.) Assembler code can be included in a Python project.


that was a excellent feature of BBC basic and I used it extensively. Recently, while looking for a bbc Basic port, I found BBC basic for windows. you can still use assembler in it, which generates 32bit code and accepts all 80486 and some pentium instructions. You can even access the windows API.  You can also export to a stand alone executable. All for a grand sum of £30...

I really hope this version of BBC Basic can and is ported to the raspberry Pi...

User avatar
Robert_M
Posts: 211
Joined: Fri Nov 25, 2011 12:50 am

Re: Some questions...

Wed Mar 21, 2012 7:38 pm

Smartybones said:


rurwin said:


Assembler code cannot be included directly in a Python program the way it can in BBC Micro Basic. (That feature is unique to BBC Basic. Not even the Spectrum had it.) Assembler code can be included in a Python project.


that was a excellent feature of BBC basic and I used it extensively. Recently, while looking for a bbc Basic port, I found BBC basic for windows. you can still use assembler in it, which generates 32bit code and accepts all 80486 and some pentium instructions. You can even access the windows API.  You can also export to a stand alone executable. All for a grand sum of £30...

I really hope this version of BBC Basic can and is ported to the raspberry Pi...



Thank you for this link!
I sometimes ride my Pi to the Forum.

Return to “General discussion”