Author Topic: Would you be interested in a Arduino UNO like board with Java8 programming?  (Read 6676 times)

0 Members and 1 Guest are viewing this topic.

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Hi All,

   I am trying to build a new development board which you can program in Java with Lambda support.
It has Arduino simplicity like apis to program and use hw peripherals. It make fw upgrade a magic as code can be put to any location.
Swapping codes/apps by dropping or maintaining its state is just an api call. Would you be interested in such a development platform?
What do you think is the best form factor and price point? Any feedback is appreciated!

Code: [Select]
package demo;
import eapi.*;

public class App {

    public static void main(String args[]) {

        final Led led = Led.init('C', 13); // Port C Pin 13
        PushButton pushButton = PushButton.init('A',
                                                8, //Port A Pin 8
                                                GPIO.INPUT_PULL_UP,
                                                GPIO.FALLING_EDGE,
                                                200, //debounce
                                                (time) -> {
            Core.println("push button event");
            led.flip();
        });

        while (true) {
            Looper.loop();
        }
}


Best Regards,
 

Offline jackthomson43

  • Contributor
  • Posts: 38
  • Country: us
It looks like a nice idea coz I haven't seen any board running Java8, but thing is what would be its purpose. As we have different boards these days like Raspberry Pi which supports everything. So how are you going to compete with Pi, Beaglebone etc. https://www.theengineeringprojects.com/2020/12/esp32-pinout-datasheet-features-applications.html
« Last Edit: March 07, 2021, 12:45:08 am by jackthomson43 »
 

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
It looks like a nice idea coz I haven't seen any board running Java8, but thing is what would be its purpose. As we have different boards these days like Raspberry Pi which supports everything. So how are you going to compete with Pi, Beaglebone etc.

Although It can run on MPU based board like Raspberry pi, this project is more focused on MCU based systems. It can run on STM32 and  esp32 based platforms.

It lowers the entry point to embedded systems as lot of people still learn java as first programming language. Syntax is easy to read and understand, not much boiler plate code with lamdas. Platform is providing and will provide more Arduino simplicity like apis. Less bugs with the help of language’s supports like out of bound array access and other type of exceptions. Having a vm gives you freedom to relocate the code where ever you like it makes fw upgrade easy. It opens door to plugin/app like features which can be downloadable. You do not need to manage the memory like you did in C, for example in this project there is no heap fragmentation.unlike with other vms, code is obfustucated at bytecode level.With oop and dynamic features you can use different programming paradigms. I am even working on a prototype where you can code on your phone or tablet than download the app over ble to your device.
 

Offline karamba

  • Contributor
  • Posts: 43
  • Country: us
Maybe it is just me but here is the order of the general purpose languages preferences I would prefer to see in an an embedded project.
1. C
2. C++
.
.
M. C# and .NET Core
.

.
Y. Python
X. Java

After introduction of .net core I think Java lost it's main advantage (or better to say C# lost its main disadvantage as it is supported on all main platforms not just Windows) Java is falling behind. At the company where I work Java is used only in legacy products, all new development happens in C#.
 
The following users thanked this post: justavm, Gregor Samsa

Offline radioactive

  • Regular Contributor
  • *
  • Posts: 173
  • Country: us
I can say I remember buying a dev board from Dallas Semiconductor (TINI)  back in the day (more than 20 years ago as I remember it) that had a fancy several-10's-of-mhz  8051 variant MCU that could run java code well enough to do a little http sever via Ethernet and turn leds on/off.  The code was pretty standard java code at the time.  Waaaay more standard than something like Android.

https://en.wikipedia.org/wiki/Tiny_Internet_Interface
http://en.wikibedia.ru/wiki/MxTNI

So,  Yeah,  definitely seems like you could get something to work for general headless kind of stuff.  Not so sure how well javax.swing.* is going to work though  (guessing not too good?).
 
The following users thanked this post: justavm

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19279
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
The three questions that come before price and availability are:
  • what are the unique benefits
  • what do you have to give up, in order to gain the benefits
  • can the same benefits be obtained other ways

I suspect the last one will be the most difficult.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: justavm, Gregor Samsa

Offline Fred27

  • Supporter
  • ****
  • Posts: 726
  • Country: gb
    • Fred's blog
No. I can think of nothing less appealing. Just because you can use a language on embedded systems, it doesn't mean that you should.
 
The following users thanked this post: GeorgeOfTheJungle, Howardlong, Yansi, justavm, Gregor Samsa

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6145
  • Country: ro
No.

Would be easier to make a poll question.

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
I can say I remember buying a dev board from Dallas Semiconductor (TINI)  back in the day (more than 20 years ago as I remember it) that had a fancy several-10's-of-mhz  8051 variant MCU that could run java code well enough to do a little http sever via Ethernet and turn leds on/off.  The code was pretty standard java code at the time.  Waaaay more standard than something like Android.

https://en.wikipedia.org/wiki/Tiny_Internet_Interface
http://en.wikibedia.ru/wiki/MxTNI

So,  Yeah,  definitely seems like you could get something to work for general headless kind of stuff.  Not so sure how well javax.swing.* is going to work though  (guessing not too good?).

I do remember too, i was pairing 8 bit pic with ne2000 ic with a minimal tcp/ip stack at the time. Because TINI was too slow, it was requiring as much as 4 secs to tackle 8kb array according to people who wanted to ship products. Price wise it was 3-4 times more expensive also. It was a head of its time.I just checked that price of the socket for tini module cost as much as blue pill  or an wifi enabled esp board.

Today lots of young developer think IOT is a new thing although it is at least two decades old. But today is a better time if not perfect as lots of tech aligned with consumer behaviour.

  By excluding punch cards we/developers were developing code by writing down hex than assembly. From otp/windowed to flash. C compiler was not feasible or not accessible. Then C/C++ compiler became normal. C compiler usage did not ramped up until gcc available for free with dev boards and debuggers go cheap. Today we are seeing even highly expensive software stacks becoming free. Embedded flash and sram size along with cpu speed increasing really fast also the power consumptions going down with better silicon processes thus prices. Also compiler tech is enhancing a lot and things become feasible with powerful PCs we have. I do believe that in very near future swift/kotlin a like language will become the new C/C++.

For Java i think issue is people are tired of it because of bad memories or hard to brake bad old experiences. Like people moved from Windows to Mac and forgot what a formatting regulary to speed up things mean. You can argue with the same price i can let somebody format my laptop every quarter :-DD. Some times developers did not liked things become easier, less fun? This almost never happened with C or C++ until security issues and difficulty of writing secure code pushed people to look better alternatives like Rust?

We seen developers jumping to objective c with fancy mac books to develop for iphone, like all those just invented. Also seen people developing for Android with Java, like it was never done before. I do believe they both manage to stick with being seamless or money  :-DD.

Google is going windows approach throw everything until one really stick or they drop like go, flutter, java, kotlin, python , js and etc.

Anyhow because of the future that i believe today I got simple example Kotlin app working with the same VM. It has more runtime dependencies thus may not able to support all fancy features of it in the beginning. Also got swift working on bare metal but runtime dependency is no go for low to medium end mcus but have some plans.

Those are intermediate steps for next. I do believe embedded systems deserves a new better language which scales well. I do not think it Rust or Micro python, i can talk the reasons with examples hours and hours.

What do you guys think?





 



 

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Maybe it is just me but here is the order of the general purpose languages preferences I would prefer to see in an an embedded project.
1. C
2. C++
.
.
M. C# and .NET Core
.

.
Y. Python
X. Java

After introduction of .net core I think Java lost it's main advantage (or better to say C# lost its main disadvantage as it is supported on all main platforms not just Windows) Java is falling behind. At the company where I work Java is used only in legacy products, all new development happens in C#.
Do you work in bay area? Which sector you guys are developing for? Would love to hear more real life stories. In the mean time I will update my knowledge base as its been a long time not checking .Net. Would love to hear more of your experience and your reasons.
« Last Edit: May 06, 2020, 05:32:54 am by justavm »
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Oh dear.
The further a society drifts from truth, the more it will hate those who speak it.
 
The following users thanked this post: Yansi, justavm

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
« Last Edit: May 06, 2020, 05:26:48 am by justavm »
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
I think if you really believe in the idea you should just go ahead, publish something, and let the "market" decide. I'm somewhat biased due to software engineering experiences but I'm willing to consider new evidence.  :popcorn:

My reaction to Java is "three". It takes three times as long to understand something, three times as long to write something, three times as long to build something, and three times as long to run something. Though JIT may have reduced the last. I think this is due to overemphasis on one style of programming such that everything must fit that paradigm. Hence factories and all sorts of circumlocutions.

So, show us the board and the development software environment for it.
 
The following users thanked this post: justavm

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Oh dear.
Be brave  ;) say more...

Java is too heavy both in cpu cycles and memory size requirements for a µC. For example, imagine the µC in an ABS: let's quit controlling for a while, it's time for a "stop the world" garbage collection...

No massive migration to micro python has happened, for the same reason. It has its uses though, but needs not any µC, but the most beefy ones.

Brave enough? ;)
The further a society drifts from truth, the more it will hate those who speak it.
 
The following users thanked this post: justavm

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 6447
  • Country: hr
Stop polluting the planet. Just say no to Java.
 
The following users thanked this post: Yansi, chriva, nuclearcat, Mp3, justavm

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7307
  • Country: nl
  • Current job: ATEX product design
Java is for programming dancing penguins on 160x120 resolution color Symbian phones.
Its one of those languages that will take a lot of effort to eradicate from the world. Like Flash.
 
The following users thanked this post: Yansi, chriva, justavm, Gregor Samsa

Offline Mp3

  • Frequent Contributor
  • **
  • Posts: 361
  • Country: us
Oh dear.
Be brave  ;) say more...

I appreciate your enthusiasm for providing new ways to learn programming very much. However, I'm not sure why you're set on Java, and the negative reactions to the choice of language is not for nothing. I learned Java in school and despised it since the market was already moving towards

Java absolutely should be left to die. It was a mess in the 90's, it was a mess in the 2000's, and it's even worse of a mess in the last decade. The world has moved on from Java as a whole, and the only people still using it are tied to legacy code for one reason or another.

The only people I know of who are employed as programmers who primarily or only work with Java for the last decade are senior managers of products that have been on the market for 20+ years. They are going to retire before their code is replaced with whatever is newer and more scalable.

Java does not scale well at all. That is why anyone who isn't using Java won't, though one could argue that such a project to help teach Java might come in handy several decades down the line where there's another instance of "COBOL programmers needed"  :palm:
High school graduate
 
The following users thanked this post: justavm

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19279
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Oh dear.
Be brave  ;) say more...

I appreciate your enthusiasm for providing new ways to learn programming very much. However, I'm not sure why you're set on Java, and the negative reactions to the choice of language is not for nothing. I learned Java in school and despised it since the market was already moving towards

Java absolutely should be left to die. It was a mess in the 90's, it was a mess in the 2000's, and it's even worse of a mess in the last decade. The world has moved on from Java as a whole, and the only people still using it are tied to legacy code for one reason or another.

The only people I know of who are employed as programmers who primarily or only work with Java for the last decade are senior managers of products that have been on the market for 20+ years. They are going to retire before their code is replaced with whatever is newer and more scalable.

Java does not scale well at all. That is why anyone who isn't using Java won't, though one could argue that such a project to help teach Java might come in handy several decades down the line where there's another instance of "COBOL programmers needed"  :palm:

Every point in that is false, pure and simple! If some caveats were added, there might just be some validity, but even then the points could be argued.

That does not imply the board proposed by the OP makes sense.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: justavm

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: pl
Which Java? Very relevant for two reasons.

“Java” is a registered trademark of Oracle(USPTO#1)(USPTO#2)(USPTO#3)(USPTO#4)(USPTO#5)(USPTO#6)(USPTO#7)(USPTO#8)(USPTO#9)(USPTO#10)(USPTO#11), and there is history of litigation caused by not following the policies(Wikipedia) and simply using the API(Wikipedia). By claiming that you implementing Java, in particular if you do not actually do it, you are exposing yourself to some risk. By using that name without actually implementing it properly, you may also face hostility from Java developers themselves: many people helping others are simply tired of the deluge of Android beginnners. Bringing even more poeple like that will not make the situation any better.

Through the past 20 years Java has proven itself to be good platform for embedded environments — in particular with extremely limited resources and high variability between hardware. The problem is… which profile of Java are you going to implement? While the Card profile is fitting well into that environment, it doesn’t mean it will be right for arbitrarily chosen microcontroller and has enough of peculiarities to not be great for beginnners. SE and EE, on the other hand, are highly dynamic and have requirements that make them unsuitable for small devices. Even if you would decide to use Card, what will be the benefits compared to the curent Arduino platform? You lose some features. You are starting from zero, having to go through years of testing and fixing bugs that are already patched in Arduino. You run it on a microcontroller tha is inherently incompatible with the Java profile. What’s the point?
People imagine AI as T1000. What we got so far is glorified T9.
 
The following users thanked this post: justavm

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
I think if you really believe in the idea you should just go ahead, publish something, and let the "market" decide. I'm somewhat biased due to software engineering experiences but I'm willing to consider new evidence.  :popcorn:

My reaction to Java is "three". It takes three times as long to understand something, three times as long to write something, three times as long to build something, and three times as long to run something. Though JIT may have reduced the last. I think this is due to overemphasis on one style of programming such that everything must fit that paradigm. Hence factories and all sorts of circumlocutions.

So, show us the board and the development software environment for it.

I am fixing the speed problem, it will run as fast as c++. By using different software paradigms we can code with less boiler plate code.
I need to understand more from you what part takes 3 times to understand is it the oop, language syntax, gc, or libraries.

I will release the project but i want to make sure it is not pre mature.
 

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Oh dear.
Be brave  ;) say more...

Java is too heavy both in cpu cycles and memory size requirements for a µC. For example, imagine the µC in an ABS: let's quit controlling for a while, it's time for a "stop the world" garbage collection...

No massive migration to micro python has happened, for the same reason. It has its uses though, but needs not any µC, but the most beefy ones.

Brave enough? ;)

This is way better  :-+ I understand you points now.

I am fixing the speed issue, it will run as fast as c++. GC can be done in background  and does not need to be a stop the world GC, it can be incremental. With swift you do not even need that. Code size will as almost similar as c++ usage too. Also i am providing a way to use C/Assembly call.

microypthon is targeting stem, i would love to hear if anybody shipped a product with it.
 

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Stop polluting the planet. Just say no to Java.

We are on the same page for polluting the planet. Tons of Android phones was running and some of them still runs dalvik vm without jit or aot. They were at least consuming 16 times more on cpu cycles and etc. My new Android phone consumes 1GB of ram just out of the box.

I hope you are not using any Android devices as all of them uses java. Kotlin on Android is just more class files for java compiler.

Polluting planet also happens in a way we write similar/same basic things again and again. Spending tons of time and money debugging same things again and again.

Tons of microcontrollers are running nops for delays. Majority of them despite they use Hw timers still does while loop checks. Really few embedded software scales power down when you run sleep x msecs.

Saying just no does not help, saying more what to look for will help a lot, thanks in advance.


 

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Which Java? Very relevant for two reasons.

“Java” is a registered trademark of Oracle(USPTO#1)(USPTO#2)(USPTO#3)(USPTO#4)(USPTO#5)(USPTO#6)(USPTO#7)(USPTO#8)(USPTO#9)(USPTO#10)(USPTO#11), and there is history of litigation caused by not following the policies(Wikipedia) and simply using the API(Wikipedia). By claiming that you implementing Java, in particular if you do not actually do it, you are exposing yourself to some risk. By using that name without actually implementing it properly, you may also face hostility from Java developers themselves: many people helping others are simply tired of the deluge of Android beginnners. Bringing even more poeple like that will not make the situation any better.

Through the past 20 years Java has proven itself to be good platform for embedded environments — in particular with extremely limited resources and high variability between hardware. The problem is… which profile of Java are you going to implement? While the Card profile is fitting well into that environment, it doesn’t mean it will be right for arbitrarily chosen microcontroller and has enough of peculiarities to not be great for beginnners. SE and EE, on the other hand, are highly dynamic and have requirements that make them unsuitable for small devices. Even if you would decide to use Card, what will be the benefits compared to the curent Arduino platform? You lose some features. You are starting from zero, having to go through years of testing and fixing bugs that are already patched in Arduino. You run it on a microcontroller tha is inherently incompatible with the Java profile. What’s the point?

Great question  :-+

Answer is none as similar to Android. I do believe language it self should be separated from support libraries and the runtime. Today people say Oracles wants monopoly which is way different than what Sun engineers thought about Java initially.

So it is Java a like language syntax as an intermediate state, ultimate goal is to introduce a new language targeting embedded systems. Kotlin and Swift are good candidates. With all the great open source tools we have it is even possible to create our own language from scratch which is designed by us not dictated, stay tuned.



 

Offline justavmTopic starter

  • Contributor
  • Posts: 16
  • Country: us
Oh dear.
Be brave  ;) say more...

I appreciate your enthusiasm for providing new ways to learn programming very much. However, I'm not sure why you're set on Java, and the negative reactions to the choice of language is not for nothing. I learned Java in school and despised it since the market was already moving towards

Java absolutely should be left to die. It was a mess in the 90's, it was a mess in the 2000's, and it's even worse of a mess in the last decade. The world has moved on from Java as a whole, and the only people still using it are tied to legacy code for one reason or another.

The only people I know of who are employed as programmers who primarily or only work with Java for the last decade are senior managers of products that have been on the market for 20+ years. They are going to retire before their code is replaced with whatever is newer and more scalable.

Java does not scale well at all. That is why anyone who isn't using Java won't, though one could argue that such a project to help teach Java might come in handy several decades down the line where there's another instance of "COBOL programmers needed"  :palm:

What is you opinion for the future of embedded systems development which language you will prefer and why?

What are the short coming of the languages you use today?
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19279
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Oh dear.
Be brave  ;) say more...

I appreciate your enthusiasm for providing new ways to learn programming very much. However, I'm not sure why you're set on Java, and the negative reactions to the choice of language is not for nothing. I learned Java in school and despised it since the market was already moving towards

Java absolutely should be left to die. It was a mess in the 90's, it was a mess in the 2000's, and it's even worse of a mess in the last decade. The world has moved on from Java as a whole, and the only people still using it are tied to legacy code for one reason or another.

The only people I know of who are employed as programmers who primarily or only work with Java for the last decade are senior managers of products that have been on the market for 20+ years. They are going to retire before their code is replaced with whatever is newer and more scalable.

Java does not scale well at all. That is why anyone who isn't using Java won't, though one could argue that such a project to help teach Java might come in handy several decades down the line where there's another instance of "COBOL programmers needed"  :palm:

What is you opinion for the future of embedded systems development which language you will prefer and why?

What are the short coming of the languages you use today?

Look at xC running on the XMOS xCORE processors. Hard realtime guarantees, multi core processing built in. Buy them at Digikey, 4000MIPS for £25, one off.

Beyond that, VHDL. The high frequency training mob use that for business rules. Seriously!
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: justavm


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf