Tag Archives: STEM

Raspberry Pi LESSON 35: Install a Free Office Like Product on Raspberry Pi

Now that we are booting in the Graphical User Interface on the Raspberry Pi, we can explore some useful applications that will run on the Pi. LibreOffice is a free product that will do many of the things Microsoft Office does. This is a great addition to your Raspberry Pi. You can install this product by going to the terminal window, and at the command prompt on your Raspberry Pi type:

$ sudo apt-get install libreoffice

Now the new software should show up under your menu button. The video above steps you through some of the cool features of the product.

Raspberry Pi LESSON 31: Making a Dimable LED with Python

In this lesson we are ready to bring together a lot of what we learned in earlier lessons. We will create dimable LEDs which will respond to two buttons. If one is pressed the LED will gradually grow dimmer. If the other is pressed, the LED will gradually grow brighter. This will require us to use our skills in using GPIO inputs, pullup resistors, GPIO outputs, and PWM.

For convenience we will use the same circuit we used in LESSON 30, shown below. Also, if you want to follow along with these lessons, you can buy the gear you need HERE.

Raspberry Pi LED Circuit
This Circuit Controls two LED from Push Buttons Using the Raspberry Pi

The objective of this circuit is that we want the LEDs to grow brighter each time the right button is pushed, and we want them to grow dimmer each time to left button is pushed.

The video above steps through and explains this code.

 

Raspberry Pi Linux LESSON 21: Adding an Admin User With Same Privileges as Pi


In LESSON 19 we showed how  to add users to the Pi with limited permissions. In this lesson we show how to add a user with Admin privileges just like the default “Pi” user.

Fist you will want to log on as the default “pi” user. After logging on, you can add another user with the command:

once the user is added, you can then give them admin privileges like the pi user my modifying the account with the command:

Now your user “paul” has the same admin privileges as “pi”. However if “paul” tries to execute a sudo command it will ask for his password. If you want “paul” to be able to execute sudo without entering password, you need to do the following:

NOTE: Messing up this file will corrupt your operating system. I suggest STRONGLY making a backup of your system before moving forward. Or, you could just leave things as they are, and “paul” will have to enter password when doing a sudo command

 and then you will be nano-editing a file. Add the following to the last line of the file:

paul ALL=(ALL) NOPASSWD: ALL

Then Control o and enter to save the file, and then control x to exit.

Raspberry Pi Linux LESSON 19: Adding New Users

In this lesson we show how to add new users to the Raspberry Pi. The default Pi account on the Raspberry Pi has sudo access, which means that when logged on as “pi” you can pretty much do anything you want by accessing the sudo command prefix. In this lesson we do not add a sudo user, but just one that can pretty much do things in their account folder.  To add another user named austin without sudo priviledges, you would use the command:

$ sudo useradd austin -m -s /bin/bash -g users

Then to assign a password, you would give the command:

$sudo passwd austin

Then enter the password when prompted.

In creating a new user in the “users” group, that new user can create and edit files in his folder (/home/austin), and can look at most things on the system, but can not change or add things outside his folder. To allow the user to have sudo privileges, he would need to be added to the sudo group.

To remove a user, you need to be logged into an account with sudo privileges, and then enter the command:

$sudo userdel austin

Which would delete the user austin. This command would delete the user, but would keep their files and folders (/home/austin), but the person could not log in any more. If you wanted to remove the user, and all their files, you would use the following command:

$sudo userdel -r austin

For this command, the user austin, and all his files are removed.

Raspberry Pi Linux LESSON 9: Using the Linux Sort Command

In this lesson we explore a new and very powerful Linux command . . . the sort command. The sort command allows you to sort a file alphabetically, numerically or by calendar month. We show how to sort forward or backward, and how to send the sorted list either to a file or to the terminal window. This quick video will get you up to speed on sorting in Linux.

Raspberry Pi with Linux LESSON 7: Using the Wildcard

In this lesson we learn how to use the Linux wildcard. The wildcard allows you to automate what would otherwise be tedious tasks. The wildcard is the * character. For example,  a command with *.txt would affect all files ending in .txt. Similarly, *.* would affect all files. You could also imagine dog*.txt would affect all files that start with “dog” and end with .txt. The video gives many examples of using the wildcard to simplify things.