mikeakohn / java_grinder

Compile Java byte-code to native CPU's.
https://www.mikekohn.net/micro/java_grinder.php
GNU General Public License v3.0
496 stars 42 forks source link

Support for Arduino One #21

Open jabrena opened 6 years ago

jabrena commented 6 years ago

Does exist any plan to compile for Arduino One?

mikeakohn commented 6 years ago

I believe this is AVR8 (atmega328) ... there's support in Java Grinder for atmega368 so it should work. I did one project with it: https://www.youtube.com/watch?v=bKoHdinjWd4 using a Trinket.. which I believe is compatible. I can add the source code to that to the Java Grinder repository.

jabrena commented 6 years ago

I will test this week. Cheers

jabrena commented 6 years ago

Once the code is generated, how to upload to Arduino?

mikeakohn commented 6 years ago

I used avrdude. If there are things you need missing from the API let me know. Joe wrote the code for the AVR8... when I was coding against it I was adding features to the API as I needed them.

jabrena commented 6 years ago

For Arduino, do you have any example?

mikeakohn commented 6 years ago

For uploading I did:

avrdude -c usbtiny -p m328p -U flash:w:water_dropper.hex

This should be the same for Arduino. I believe the board had an Arduino bootloader on it.

jabrena commented 6 years ago

I will test how to develop in Maven some automation to send the code after compiling with the project: https://arduino.stackexchange.com/questions/3784/how-to-upload-an-arduino-sketch-from-java-processing