Why not? Let’s make it fun.
I have spent the weekend to try out. My target was set up the environment for Swift programming on my Raspberry Pi 3B+. I bought it from Amazon a few days before the weekend.
My first attempt was with Ubuntu Core 16 or Ubuntu snappy. Because there’s no apt-get in there, you have to stick to the Snap ecosystem rather than apt-get. The other choice is switch back to Classic mode, which is not in stable release right now. I paid the patient with Snap, found some appropriate software. But got no luck on Swift setup. I could go ahead with more effort, but my time was up. I walked away.
The second try was with Raspbian Stretch Lite OS. The outcome is fantastic. I spent haft day with Ubuntu Core OS, however, it just took me less than an hour to set up all the stuff on Raspbian Stretch Lite OS, because of some reasons.
- The community is more active, more supports, more resources, more guides.
- Raspbian Strech Lite OS has apt-get in place, you’re able to set up all needed parts very quickly without trouble, even with Swift.
- Set up a Raspian OS is more convenient because you don’t even need an additional monitor or keyboard.
- The other thing to consider is boot time. The Ubuntu Core take up to 5 mins to completely on, but take less than 30 seconds with Raspbian. In the meanwhile, the Raspbian Stretch Lite image is 5 times larger than Ubuntu Core. So smaller doesn’t mean faster.
Ok, First and foremost, let’s get started on Raspbian OS in this quick tutorial.
Set it up
Keep in mind that this tutorial is done on Raspberry Pi 3 B+, and MAC OSX
– First, download Raspian stretch lite here
– Second, We have to flash the image to the micro sd card. I use this Balena Etcher, download it here. Open the app, choose the disk ( which is your sd card) and flash it.
– Third, Open the disk directory, config Wifi if needed (Raspberry Pi 3 B+ comes along with Wifi and Bluetooth built-in).
Create a file named wpa_supplicant.conf with the following content
psk=”Your Network’s Passphrase”
– Lastly, Open SSH by putting an empty file named ssh in there (with no dot, no extension at all)
Now put back the sd card into your Raspberry Pi, plug the power cord. Wait about 30 seconds
Open the terminal, use the following command to connect the machine
Keep this in mind, the default account is pi and password is raspberry
Use this command to change the password if you want
The machine is completely on in a very short and simple manner. In the next coming post, I will talk through the Swift setup, so stay tuned 🙂