getting started

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
User avatar
trentonadams
 
Posts: 9
Joined: Mon Jul 24, 2017 6:46 pm

getting started

Post by trentonadams »

Hi Guys,

What do I need to get started with PI 3? Depending on whether I can adjust power usage or not, I may get into doing my own surveillance cameras for my home. But, I need to get started somewhere. But to start, I wanted to get familiar with the device, and

Also, are these devices compatible with PI 3, or just PI 2?

PiTFT Plus 480x320 3.5" TFT+Touchscreen for Raspberry Pi PID: 2441
Raspberry Pi 3 - Model B - ARMv8 with 1G RAM PID: 3055

5V 2.4A Switching Power Supply with 20AWG MicroUSB Cable PID: 1995

Miniature WiFi (802.11b/g/n) Module: For Raspberry Pi and more PID: 814

USB Battery Pack for Raspberry Pi - 4000mAh - 5V @ 1A PID: 1565

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: getting started

Post by adafruit_support_mike »

If you're looking to get familiar with the Pi3 and Linux in general, starting with just the board will be good. Spend some time getting familiar with the general environment, then look at adding hardware when you're a bit more comfortable.

The best suggestion I can give you is to download the latest OS image and work through the steps to get the board running, keeping notes every step of the way. Once you hit a point that seems good enough, switch to another SD card and do it all again using your notes as a reference. I generally make ten passes through that loop when I'm trying to learn a new system or piece of software.. three or four times to find most of the things I should have written down but didn't, then once a week to see how well I can do it from memory.

The goal is to reach the point where it's boring. Boring is good.. it means things are working as expected.

All the devices you listed will work with the Pi3, but the Pi3 has a built-in Wifi adapter. You'll only need pid 814 if you want a second Wifi interface.

User avatar
trentonadams
 
Posts: 9
Joined: Mon Jul 24, 2017 6:46 pm

Re: getting started

Post by trentonadams »

Thanks for the response. I'm guessing it won't be much trouble. I've been a BANNED Linux user since 1993 ish. I started out my career in 2001 with embedded software development and kernel driver development as well. Just haven't done it in a while now. If you can handle Gentoo for a couple years, you can handle anything! :)

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: getting started

Post by adafruit_support_mike »

In that case you just need to get comfortable with the local dialect.

The major quirks are:

- the SD card has a FAT-32 filesystem that mounts to /boot in Linux and as a removeable drive on a desktop computer
- the boot-time config files are /boot/config.txt and /boot/cmdline.txt
- first-time system configuration is done using `raspi-config`
- the package utility is `apt` and most things are installed with `apt-get`
- Raspbian uses LXDE as the desktop

Back-compatibility between the OS and the hardware is spotty. The latest version of Raspbian should run on anything that exists currently, but older OS images don't necessarily work with newer hardware. The latest image is available here:

https://www.raspberrypi.org/downloads/raspbian/

and writing the image to an SD card is painless with Etcher:

http://etcher.io/

When you're ready to start working with external devices, you enable the interfaces in `raspi-config` under the 'Advanced Options' page.

The 'device-tree overlay' system is a relatively new system designed to solve the combinatorial nightmare of compiling a new kernel every time you want to connect a new device, and many existing boards already have their own DTOs. Creating a DTO is slightly less complicated than configuring a kernel build, but there are no point-and-click interfaces yet.

It's a good idea to build scripts to install the system configuration you want, because the Linux 'just replace the whole kernel' model of upgrading the OS erases things like PiTFT support. We're migrating toward script-based installation for everything ourselves, especially since a recent hardware update to the Pi2 broke all the existing OS images that work on older Pi2s.

The official language of the RasPi is Python, so most code support you find will be written in that. The bulk of existing code is written for Python2.7, but there's a bit of a schism going on at the moment as Python3 gains traction. Python2.7 and Python3 are incompatible in key ways, so they have separate interpreters and module install trees. We're seeing an uptick in problems where people install a package but it goes to the version they weren't using.

User avatar
trentonadams
 
Posts: 9
Joined: Mon Jul 24, 2017 6:46 pm

Re: getting started

Post by trentonadams »

Nice getting started, thanks!

The fat32 /boot thing used to be very common back in the 90s.

I use Linux Mint (debian variant) for my workstation at work, so I'm very familiar with debian based packaging.

It sounds very much like they've made building new kernels more complicated than it needs to be. I've never found a Linux kernel that was difficult to build, not since 1993. I guess I'll find out when I start needing to do that.

Curious, why etcher and not dd? Usually, when you dd, if there's an IO error, it lets you know.

I've never programmed in Python before, but I'm aware of it. Being okay at a new language isn't tough though. It may not be professional, but it will work! lol.

If I wanted to develop LXDE apps, is that python as well, or some other language like C/C++?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: getting started

Post by adafruit_support_mike »

You can use `dd` if you like, but depending on your OS you also have to faff around with identifying the device file, unounting the disk, etc. The command-line version isn't bad in a 'nix environment, but from a GUI, Etcher makes it a one-click operation.

Are you familar with Perl and it's motto 'There's More Than One Way To Do it'? Python is its polar opposite. Its evolution is in the direction of One Way To Do Each Thing, several of which are even documented. It was originally developed as a toy language for intro-level CS students, so principles like correct indentation are enforced by the parser.. whitespace has syntactic meaning, and four leading spaces do not do not equal one leading tab. It's Turning-complete, so it can do anything any other grownup language can, but the dropoff from 'just works' to 'have to be deeply familiar with the internal structure to understand what's going wrong' is relatively narrow and steep.

For GUI apps, there's a framework called PyGame (Python-based, naturally), but any other framework will work.. Tcl/Tk, C-based X-windows code, etc. If you already know a toolset, it will probably carry over.

User avatar
trentonadams
 
Posts: 9
Joined: Mon Jul 24, 2017 6:46 pm

Re: getting started

Post by trentonadams »

Perl's ability to do things in multiple ways was annoying. So many developers chose the most difficult to read way of doing things.

But yeah, I've used dd so much over the last 20+ years that it's just natural. I was just curious if it new something special about how to make raspian work or something. You never know if it's doing some weird binary magic. I figured it was highly unlikely, given raspian is linux.

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: getting started

Post by adafruit_support_mike »

No, if you're familiar with 'nix in general, you'll feel at home on the RasPi pretty quickly.

User avatar
trentonadams
 
Posts: 9
Joined: Mon Jul 24, 2017 6:46 pm

Re: getting started

Post by trentonadams »

Yeah, I have it running now.

You've got some sort of kernel overlay going on with the tft. Is there a way I can just get the source and build a kernel module?
https://www.adafruit.com/product/2441

It's been awhile since I built a kernel module, but can't you specify the module on the boot loader? Or because it's a screen device, maybe it needs to be integrated right into the kernel bin?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: getting started

Post by adafruit_support_mike »

The source is over in our Github repo:

https://github.com/adafruit/adafruit-raspberrypi-linux

There's a combination of things you have to install though. The kernel has to be patched to allocate memory for a framebuffer and handle the device-specific IO to update the screen. That already exists as a package you can install through `apt-get`.

Even with that, the DTO is necessary to assign those GPIO pins to communicate with the PiTFT. The device tree is the central broker for all pin IO now.

User avatar
trentonadams
 
Posts: 9
Joined: Mon Jul 24, 2017 6:46 pm

Re: getting started

Post by trentonadams »

How do you distinguish between a raspberry pi 3 compatible kernel vs the other versions of raspberry pi?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: getting started

Post by adafruit_support_mike »

Broadly speaking, you don't. The latest code supports all the existing microprocessors, and I've never seen a version tuned to a specific board.

As long as the image is built from a recent enough release, you should be able to plug the SD card into any RasPi and have it boot.

User avatar
trentonadams
 
Posts: 9
Joined: Mon Jul 24, 2017 6:46 pm

Re: getting started

Post by trentonadams »

Okay, cool. I won't worry about looking into rolling my own then. I just wasn't sure how it all worked.

User avatar
trentonadams
 
Posts: 9
Joined: Mon Jul 24, 2017 6:46 pm

Re: getting started

Post by trentonadams »

Just about to look into installing with an image. It seems like your image is really old. September 2016, while the latest raspbian is from July 2017. What impact does that have on me getting the latest?

1. If I use the repository method, will I get the latest kernel? i.e. do you guys keep that up to date?
2. If I install your image, is it up to date enough that I can just update everything to the latest versions using apt-get?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: getting started

Post by adafruit_support_mike »

Uae the latest version of Raspbian from the RasPi Foundation:

https://www.raspberrypi.org/downloads/raspbian/

We still have OS images in the tutorials because those used to be an easier way to distribute software support for the PiTFT, but earlier this year there was a hardware update that broke back-compatibility with older OS images. We're migrating to package-based installation for everything, but keep the older images for historical reasons.

We keep the packages on our server up to date, so they should install seamessly on any recent version of Raspbian.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”