Arduino vs Raspberry pi
Hello guys, sorry to disturb you all... is there any expert in arduino or raspberry pi here please.
I want to get started with IoT (internet of things), I want to have my own server (I saw someone on youtube creating his own server using only his rasbperry pi).... I don't really know what's the difference between an arduino or a rasbperry pi... would really appreciate if someone can just give me an overview and if someone can recommend me what to have to build my own server and just get started with IoT, will really appreciate :c
81 Replies
well, depends on which arduino and raspberry pi
a raspberry pi is really nothing more than a PC, just smaller. It runs a regular operating system (almost always a flavor of linux), supports USB peripherals, wifi, ethernet, bluetooth, has video and audio out, runs at gigahertz speeds, has gigs of ram, the ability to run pretty much any programming language known to man, and even just be used as a low-end desktop computer.
An Arduino is a microcontroller. It's a much, much more basic circuit that runs at megahertz speeds, has kilobytes of memory, and zero built-in peripherals. You program it with a C-like language (there's micropython too, but it's usually too slow for actual arduinos I think), but your code will be the only thing that runs on it. There's no OS. You also don't get wifi or networking or many other things you get for "free" with a raspberry pi
there's also the raspberry pi pico, which is closer to an arduino
but also very different
yeah, a pi pico is a micro controller, not a single board computer (sometimes refered to as an SBC) like the other raspberry pis
hmm can we have some sort of "universal" device that does the same thing as a raspberry pi and and arduino instead of needing them both?
My primarily I want to set up a server so I guess I need to go with the raspberry pi
there's also tons of other SBCs like orangepis and a bunch of others
banana pi too
and there's so many
a pi also has GPIO, so a pi can do most things an arduino can
I literally have 0 knowledge on them right now 😭 but I guess I should do some research them came back
there's also the "clones" that use rockchip chips
will just do some research and came back
what exactly do you want to do?
or what sort of project?
set up my own server
host my own thing
do you want to control anything?
I saw that on youtube, it's seem fascinating
a tiny screen? sensors? something?
euh
that is 100% something an arduino can't (practically) do. But also, if you want to run your own server, it's cheaper to just use any old PC or laptop you have laying around
I don't think so
oh ok
then use a virtual machine or a pi zero 2 w with headers
it's cheap af
or look for it's clones
Ok ok will just have a look at what you guys mentioned and came back. What I wanted to do is, I had a project for uni, the thing is my friends and I have to use our database which was SQL Server. But the thing is, we don't have a cloud db for that, so each one of us need to run their local instance.
What I wanted to do is create my own "local" sql server where my friend and I could work together. This is where someone recommend me to use a raspberry pi
if you want to run Microsoft SQL Server, you'll need windows, which won't run on a pi
ah ok
that sucks
😭
if you want to run something like mariadb or mysql or postgres, it'll run on a pi just fine
yeah, and windows on pi has been outdated for a while
their is no way I can create a local server for the sql server ? using another technology ?
and honestly, it's almost perfect for showcasing something tiny
I'd just not bother with windows on pi, cause the license you'd have to buy to run windows is much more expensive than the hardware
are you set on MS SQL Server?
it also runs like crap, so
or is something like mariadb or mysql fine too?
euh I needed to use MS SQL but the project is over now xd but just to have the knowledge I wanted to try it out
then your best option for MS SQL Server is to grab an old PC or laptop and use that
Alright, noted !
the knowledge of ms sql isn't transferable for others, by the way
eeehhhhh... it's still SQL
yeah it's just a dialect, I guess
yeah, but the install process and everything is 100% not translatable to others
it's a little different to query. Management is very different. But using MS SQL Server isn't significantly different than using Postgres
just the sql is transferable
user management and everything is so different
Thanks for the advice guys, will just read a bit more then decide on what I will do, ty !!
A bit late to the convo, but if you're not dead-set on using SQL Server you could switch to SQLite, which is a perfect fit for something like a Pi. It's still SQL, so your SQL Server knowledge is transferrable, and being SQLite it's super easy (barely an inconvinence!) to transfer the data from one machine to another—it's just a file! Copy and paste and you're set to go.
heard a lot about SQLite, I should try to give it a go
you should
it's actually really awesome
DB like SQLite is for small project, like personal projects, no ?
https://sqliteonline.com/ <-- you can try it on websites like this
it's a serious database
In my opinion, SQLite should be your default, go-to database
over 10 years ago it could handle about 100000 unique visitors
oh ok
Sure it doesn't do multi-threading. Sure it doesn't do distributed. But until you actually need those things it just flies.
I thought it was something like mongoDB where we would use it just for something really small
no, no
it's a real full blown sql database
"Really small"? No, "really medium-big"
yep, I have some free time right now, will give it a try, thanks guys 💯
i recommend that you put the file in a separated folder, on it's own, as it may need to write temporary files there
From a blog written in 2023.
Over 500k writes per sec and over 1m reads per second. That's not "small" by any streatch of the imagination.

-# ugh, dark text on darkmode is dark
https://discord.com/channels/436251713830125568/1215798146622296084
sqlite is used in many many things
android uses it
Chrome uses it
firefox uses it as well
i think it is used in aviation too
It's literally the most used database in the world. Though we're getting a bit off-topic here as this question was originally about Arduino vs RPi :p
it was about that to host a database
and hey, if someone compiled a version of the client for arduino, with an sdcard reader, it can do sqlite
hmm I when creating tables? or the databases itself ?
the database is a single file
The database itself is a …damnit Epic :p
🤣
Well, to be fair, you can have as many database files as you want. If it makes sense to divide the data into multiple files you can (but if you need to read/write to multiple files then just have one)
I just changed my mindset on SQLite, I never thought it was used such extensively
it is
For example, say you have a Discord bot that has specific settings for each server it's in. You could easily have one db file per server since they're not directly related to each other. That way if a server removes your bot it's a simple "delete server file" to remove that data
yeah I see
But you wouldn't have a seperate db file for the user table and one for the orders table in an online store DB. You'll be cross-referencing them together all the time. One file for that
yep true
also, highly sensitive data could be stored in multiple files in multiple directories (to avoid temporary files being used by accident)
-# am very passionate about SQLite, can you tell? lol
you can have a completely different database file for the backend
if the front-end has a vulnerability that allows sql injection, you wouldn't leak the admin page
or if the admin login has a vulnerability, the user data would be safe
Another fun thing you can do is use different DB files for access levels. Say for example you have a sales coordinator who needs access to specific info to run stats for your sales. Instead of giving them limited access to the DB itself, you run a query on the DB and make a new DB file with the result. The sales coordinator now only has the info they need to do their job. No need to worry about them getting access to info they don't need/shouldn't have.
Of course if the SQL query is badly written…shit can happen. So it's kinda 6 of 1, half-dozen of the other 🤷
also, audit logs could be stored in separated databases, to be easy to analyze
that is also a nice benefit
and you can anonymize the data before giving it
so to sum up all that ----> LEARN SQLite xd
basically
you can use sqlitestudio or another sqlite client to mess directly with the database
also, i strongly suggest you to use the .sqlite file extension, instead of using the .db or .sqlite
it disambiguates a lot on what the file is for
(in reality, you can name it with .trololol as an extension, but, using .sqlite3 is better)