Welcome to rascam’s documentation!¶
Rascam is a RPi-based camera whose functions and designs can be added by users. Rascam comes with LCD screen and RGB Flash that are indispensible for a camera.
The additional parts, including shutter, joystick, power, render the camera some features of digital camera. Besides, the camera has 9 extension ports (2 * I/O, 2 ADC, 2 PWM, 2*I2C and a UART port), which satisfies your requirements of plugging sensors and some other external equipments.
As you can see, the suitable Camera module is already included in the product lists. Here, you also have the installing holes and some accessories of High Quality Camera. All these parts are designed well for your practical use.
Component List and Assembly Instructions¶
You need to check whether there are missing or damaged components according to the list first. If there are any problems, please contact us and we will solve them as soon as possible.
Please follow the steps on the PDF to assemble.
READY TO PLAY¶
This chapter is used to set up Raspberry Pi, from burning system to initializing the environment.
Burn Raspberry Pi OS System¶
Prepare the following items and tools:
Raspberry Pi |
1 * Power Adapter |
1 * Mirco SD Card |
1 * Personal Computer |
2. Prepare the tool of image burning. Here we use the Etcher. You can download the software here: https://www.balena.io/etcher/.
3. Download the Raspberry Pi OS image file here: https://www.raspberrypi.org/downloads/raspberry-pi-os/
4. Unzip the package downloaded and you will see the .img file inside.
Note
Do not extract the .img file.
With Etcher, flash the image file into the SD card.

Connect the Raspberry Pi to the Internet¶
You need to modify a Wi-Fi configuration file wpa_supplicant.conf in the Micro SD card by your PC that is located in the directory /etc/wpa_supplicant/.
If your PC is working on a linux system, you can access the directory directly to modify the configuration file; however, if your PC use Windows system, what you need next is to go to the directory, /boot/ to create a new file with the same name, wpa_supplicant.conf. This file will overwrite the original Wifi configuration file at the next boot.

Input the following content in the file:

You also need to add an empty ssh file to enable the remote access the command line function.

Now, the Raspberry Pi OS system is configured. When the Micro SD card is inserted into the Raspberry Pi, you can use it immediately.
Power On¶
Press Power Button to start Rascam. The power button has three functions:
Press once to start Rascam.
Press twice to power off.
Long press to shutdown RPi.

Note
Initialize the Environment first when using the function 3.
Get the IP Address¶
Raspberry Pi will automatically connect to Wi-Fi after booting, we need to get the IP address of it. There are many ways to know the IP address, and two of them are listed as follows.
Checking via Router
If you have permission to log in the router (such as a home network), you can check the addresses assigned to Raspberry Pi on the admin interface of router.
The default hostname of the system, Raspberry Pi OS is raspberrypi, and you need to find it. (If you are using ArchLinuxARM system, please find alarmpi.)
Network Segment Scanning
You can also use network scanning to look up the IP address of Raspberry Pi. You can apply the software, Advanced IP scanner and so on.
Scan the IP range set, and the name of all connected devices will be displayed. Similarly, the default hostname is raspberrypi, now you need to find the hostname.
Remote Control¶
We can open the Bash Shell of Raspberry Pi by applying SSH. Bash is the standard default shell of Linux. The Shell itself is a program written in C that is the bridge linking the customers and Unix/Linux. Moreover, it can help to complete most of the work needed.
For Linux or/Mac OS X Users¶
Go to Applications->Utilities, find the Terminal, and open it.

Type in ssh pi@ip_address. “pi” is your username and “ip_address” is your IP address. For example:
ssh pi@192.168.18.197
Input ”yes”.

Input the passcode and the default password is “raspberry”.

Note
When you input the password, the characters do not display on window accordingly, which is normal. What you need is to input the correct passcode.
5. We now get the Raspberry Pi connected and are ready to go to the next step.

For Windows Users¶
If you’re a Windows user, you can use SSH with the application of some software. Here, we recommend PuTTY.
Download PuTTY.
2. Open PuTTY and click Session on the left tree-alike structure. Enter the IP address of the RPi in the text box under Host Name (or IP address) and 22 under Port (by default it is 22). Click Open.

Note
When you first log in to the Raspberry Pi with the IP address, there prompts a security reminder. Just click Yes.
3. When the PuTTY window prompts “login as:”, type in “pi” (the user name of the RPi), and password: “raspberry” (the default one, if you haven’t changed it).

Note
When you input the password, the characters do not display on window accordingly, which is normal. What you need is to input the correct passcode.
4. Here, we get the Raspberry Pi connected and it is time to conduct the next steps.

Initialize the Environment¶
Initialize the environment before playing the Rascam. The methods are as follows.
Change directory to /home/pi.
cd /home/pi/
Note
cd, short for change directory is to change from the current path to the intended directory. Informally, here is to go to the path /home/pi/.
Clone the repository from github.
git clone https://github.com/sunfounder/rascam.git
Enter the folder rascam
cd /home/pi/rascam
Start up the initialization function.
sudo python3 setup.py install
Note
This process may take some time, please do not turn off the power.
The message appears after the installation is complete.

Type Y to reboot Raspberry Pi.
GO TO PLAY¶
This chapter introduces how to use Rascam, DIY, etc.
Take a Photo¶
You can make the LCD a viewfinder and press the shutter to take a photo. The methods:
Enter the folder.
cd /home/pi/rascam/example
Run the program code.
sudo python3 take_picture.py

The shot photos are stored at this path.
/home/pi/Pictures/rascam_picture_file
Press Ctrl+C to stop the example.
Check Photos¶
Samba helps when you share and other devices access your photo album. Steps:
Run the command to set up Samba service.
sudo apt-get update
sudo apt-get install samba samba-common-bin
Configure Samba typing.
sudo nano /etc/samba/smb.conf
Note
Press ctrl+o to save what you modify in nano editor, ctrl+x to to exit.
Input the following content at the end of the file:
[share]
path = /home/pi/Pictures/rascam_picture_file #This is your album path.
valid users = pi
browseable = yes
public = yes
writable = yes
Restart Samba service.
sudo service smbd restart
Add sharing account.
sudo smbpasswd -a pi
Note
A sharing account “pi” is created and you need to set your passcode.
Mount Photo Album to Windows¶
Under This PC, click Map network drive.

Type “\hostname or IP address\the name of the shared files” in the path bar.

Type in the username and the password. Click OK button, and you can access the shared files.

The album will appear as a new volume under this PC.

Mount Photo album to iOS¶
The system newer than iOS 13.0 can directly mount storage in Files. The older versions of iOS can use APPs like DS File.
Open Files.

Tap Connect to Server in 「Menu」.

Enter your Rascam IP address.

Log in.

Now, you can directly access the photo album in File.

Start On Boot¶
Modify crontab to make Rascam start the camera program on boot. Steps are:
Run the command.
sudo crontab -e
Note
At the first time you execute the command, you need to select an editor and then choose nano.
Input the following content at the end of the file.
@reboot python3 /home/pi/rascam/example/take_picture.py
Note
This is the example of starting on boot (it can be modified to others). If you want to cancel the “start on boot”, back to the file and delete this line.
Then save and exit and you should see the message.
crontab: installing new crontab
Reboot.
sudo reboot
DIY Function¶
Rascam comes with many interesting functions that you can try one by one or combine them to be new ones.
Enter the folder and list the example files.
cd /home/pi/rascam/example
List the example files.
ls
Note
ls is a command to list computer files. When invoked without any arguments, ls lists the files in the current working directory.

You can run the python codes by the following command.
sudo python3 photo_effect.py
You can use or refer to the following examples:
add_content_on_screen.py
This example is used to make the LCD display the word information when it work as a viewfinder.
photo_effect.py
This example can be used to add the filter for photos and toggling
calibrate_camera_imu.py
If the shot pictures are inverted, you may have to calibrate the IMU by following the descriptions below.
Run this example.
Hold the Rascam.
Press “s” to start your calibration.
Let Rascam separately rotate 360° along x, y, and z in a slow way.
Press Ctrl + C to exit the example.
countdown_photo.py
This example makes you take a countdown photo.(8s by default)
screen_brightness_control.py
It is an LCD screen brightness control example.
flash_light_camera.py
This example makes a flash when you take photos.
show_and_change_camera_setting.py
Long press the joystick button to enter custom menu, and there will appear the adjusting options (brightness, contrast ratio) that you can add or modify by coding.
human_face_detect.py
This function makes Rascam detect faces.
make_time_lapse_video.py
This example sets the time-lapse photography for Rascam. Before using it, you need to open the code file via editor and modify some parameters (e.g. the image size and the shooting duration).
take_picture_and_upload.py
It can upload the shot photos of Rascam to Google Drive. You need to verify the Google account first. Steps are:
Enter the website: https://developers.google.com/drive/api/v3/quickstart/python.
Login account.
Click the (Enable the Drive API) button to open Google Drive API service.
Select default option ‘desktop app’.
Click (download client configuration) to download the file name credentials.json.
Place credentials.json. in the ‘/home/pi/rascam/rascam’ folder.
Connect the screen and keyboard to RPi.
Run the example in RPi terminal.
Note
The browser will pop up to guide you log in your Google account.
After completing the authentication, you will be able to use the example without external devices.
web_control
Use this function to control Rascam remotely via browsers. Steps are:
Execute step 1~8 of “take_picture_and_upload.py”. If steps have been executed, skip the operation.
Go into the path:
cd /home/pi/rascam/example/web_control
Run the python code:
sudo python3 start_server.py
Input the IP of Rascam on the browser of your devices to enter the using page.
Play it.
Copyright Notice
All contents including but not limited to texts, images, and code in this manual are owned by the SunFounder Company.
You should only use it for personal study, investigation, enjoyment, or other non-commercial or nonprofit purposes, under the related regulations and copyrights laws, without infringing the legal rights of the author and relevant right holders.
For any individual or organization that uses these for commercial profit without permission, the Company reserves the right to take legal action.