Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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. -
hieucoder105y@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.
-
@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. -
If you can write basic C, you can get a lot out of arduino compatible boards for a lot cheaper.
-
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. -
@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. -
hieucoder105y@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
-
@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... -
VaderNT16175yLike 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. 👍
-
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. -
VaderNT16175y@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.
Related Rants
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?
rant
raspberry pi