0

Which is the best Raspberry Pi board for a beginner to start learning Raspberry Pi?
Is there any Raspberry Pi or Arduino board that I can program in Java?

Comments
  • 5
    Raspi and Arduino are completely different things!

    Raspi has a full-blown Linux so that you can do everything on it that you can do under regular Linux, just with less CPU power and less RAM.

    Arduino is with a microcontroller that is much too small to run Linux. You use it either without any OS, or with a small real time OS.
  • 1
    @Fast-Nop Which one is better for a complete beginner to start learning robotics? I know Python so I was thinking of Raspberry Pi but not sure which one is better for the long run.
  • 3
    @hieucoder Arduino is meant to ease the entry into low-level programming. You program it in C or C++, not in Java or Python.

    Raspi on the other hand is a small and inexpensive Linux box so that you can easily run Python if you don't expect a lot of CPU horsepower.
  • 0
    @Fast-Nop Is there a board that runs on Java?
  • 1
    If you can write basic C, you can get a lot out of arduino compatible boards for a lot cheaper.
  • 0
    @Fast-Nop Do you know a good Arduino board best suited for a complete beginner?
  • 0
    @yellow-dog I can write Hello, world! in C.
  • 1
    Pretty sure you can do conditionals and loops, and thats about what you need to program an arduino.

    You should get a knockoff UNO on aliexpress or something, the genuine ones are expensive and you will fry a lot of them.
  • 5
    @hieucoder Forget Java and Arduino. You have 256k flash-ROM and 8k RAM on the larger Arduinos. On the smaller, it's like 32k flash-ROM and 2k RAM. You couldn't even store the JVM in the flash-ROM, let alone run it.

    You'd need to learn at least C, and get familiar with low level programming, and with hardware. Embedded systems with microcontrollers are a special dev domain of their own.
  • 0
    @yellow-dog Yeah, I know those. EZPZ. And oh, ok.
  • 1
    @Fast-Nop Interesting. I work in Java so I was looking for an easy transition but nevermind, I can learn C and C++. :D Thanks! :D
  • 0
    @hieucoder Fwiw back in the day Sun released "Sunspots" which were designed to be that - Java as close to the hardware as possible. They were pretty nice to code on too.

    Of course, Oracle shut them down yonks ago though so good luck getting your hands on any. I've still got a pair somewhere I hold onto just in case...
  • 1
    Like already said, a Raspberry Pi runs a full-fledged Linux distribution (called Raspbian). OpenJDK is available in its packages, GPIO libraries exist, and thus you can easily develop in Java. Or any other JVM language, e.g. I'm controlling an RFID reader with Kotlin. 👍
  • 1
    Another question is whether any language with garbage collector is a good idea for robotics. If you have real-time contraints like driving IOs within a certain time limit e.g. for servo motor control, then probably not.

    Even in a language with manual memory management, these code paths shouldn't be using dynamic memory allocation because that would run into similar problems.
  • 1
    @Fast-Nop very true. Additionally Raspbian isn't a real time OS. My guess is the combo should be good enough for simple robotics projects, considering the "build your own robot" examples written in Python.
Add Comment