2 Hardware ..................................................................................................
2.1 R.PI....................................................................................
Introduction
The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries. just over seven million Raspberry Pis have been sold around the world.
Raspberry PI Models :
1- Raspberry PI 1 model B (2012).
2- Raspberry PI 1 model A
3- Raspberry PI 1 model B+
4- Raspberry PI 1 model A+
5- Raspberry PI 2 model A
6- Raspberry PI 2 model B (We use this).
7- Raspberry PI 3 model B (February 2016)
Raspberry PI Systems:
1- NOOBS :
1- NOOBS
2- NOOBS LITE
2- Raspbian
1- RASPBIAN JESSIE WITH PIXEL
2- RASPBIAN JESSIE LITE (We use this).
Raspberry Characteristics
- ARM CPU running at rates that range from 700MHZ to 1.2 GHZ depending on the version/model of the PI.
- RAM ranges in size from 256M bytes to 1 GB bytes depending on the version/model of the PI.
- On chip graphics processing unit (GPU).
- SD card is used to store the OS and data/program storage.
- Most PI boards have between one and four USB slots, HDMI and composite video output, and a 3.5 mm phone jack for audio.
- Lower level output is provided by several GPIO pins which support common protocols like I²C.
- The B-models have an 8P8C Ethernet port and the Pi 3 has on board Wi-Fi 802.11n and Bluetooth
- 8The Foundation provides Raspbian, a Debian-based Linux distribution for download, as well as third party Ubuntu, Windows 10 IOT Core, RISC OS as operating system for the PI.
Raspberry Project :
1- Deal With Smart House Automation .
2- Remote Control Reboots, Submarine .
3- Camera Streams .
4- Remote Monitor .
5- Smart TV
6- Super Computer
2.2 Sensors .................................................................................
2.3 Connections..........................................................................
we have 2 Methods to retrieve Database form Raspberry
1- Connect All Computer in Same Network
- Raspberry Connecting by wired cable to Switch and All Computer Connect at the same Switch
- Raspberry Connecting by WiFi Network by Dongle
2- Connect Database of Raspberry to Cloud Server
- we upload local database of Raspberry into cloud server and retrieve Data
2.4 Local Reading ……………………………
Hardware
5 Implementation .............................................................................
5.1 Program , Read Temp On R.I.P
This is a modification of our original Python script but
We are adding code to handle the MySQL functionality.
Firstly, at the top of the script we add an import for the MySQLdb Python library we downloaded earlier.
A bit further down you will see variables that will be used when communicating with loacal MySQL (password, user, host etc) -!
“sql = …” is a string that we will send to MySQL as a command that adds our datetime and temperature values to the tempLog database. There is then a try statement that executes the sql command. If for some reason that fails the except code will run, printing a fail message and discarding attempted changes to the database. Play about with this code and try to change stuff, its the only way I learnt how to it works.
5.2 Database ...........................................................................
5.3 Pages........................................................................
in users settings
we talk about the exist user or not and ability of edit process
this page divide into 3 part
First part (Search part)
In Drop Down list you Choose what will be search (ID/Name) as you shown
in Text box you write/enter the Name or ID of user
Finally you put in Button (Search) to begin the search process
Second Part (Edit Part)
in this part have 6 Text box
in first text box is locked (User ID)
after this you can edit
1- user name : name of user
2- password
3- Name : full name of user
additional info
4- E-mail: E-mail of user
5- phone number of user
Third Part (Rank Part)
in the this part you have 6 check box (user rank / user type)
if user
1- Administrator (Manger of company)
2- Fridge Administrator (admin of Fridge)
3- Store Administrator (Admin of store)
4- users Administrator (Manger of users)
5- Store Employee (Employees of store)
6- Locked Account (Lock the Account)
in item settings
we talk about products and value of it
this page divide into 2 part
First Part (Search box)
in text box you enter/ write the full name product or part of name and will appear all product In first GridView
that has same name , the type of product/item and price
in Second GridView
that will show the id , Location_Name , CurrentBalance , MimQuantity , MxQuantity
when you Pressure in select what ever in 2 GridView you will move to second part
you can be able to change in 5 text boxes (item Name , Type , Price , Minimum quantity , maximum quantity and Balance )
and Drop Down list you Choose Location (Location)
and when you finished of changing value you have 3 button
1- save all change
2- clear all value in text boxes
3- Delete product/ item
In Store Page
this page divide into 2 part
First part (Search Box)
in text box you enter/ write the full name product or part of name and will appear all product that has same name In First GridView under the search box
it show (ID of product , Name of product , type of product and price of product)
in Second GridView
that will show the id , Location_Name , CurrentBalance , MimQuantity , MxQuantity
when you Pressure in select what ever in 2 GridView you will move second part
it shape the item settings (Search box)
Second part (Item Details)
this part you can see , it place you show the product information
1- item ID : the ID of product
2- item Name : the name of product
3- price : price of product
4- type : what the product type
5- Current Balance : the exact quantity of product now in fridge
6- Minimum Quantity : the Smallest quantity in fridge of Product
7- Maximum Quantity : the biggest Quantity in fridge of product
8- Location : the location of fridge
9- Operation Type : the operation of input product (in) or out product (out)
10- Enter Quantity : you Enter your Quantity in database for new
and when you finished of changing value you have 2 button
1- save all change
2- clear all value in text boxes
Introduction
The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries. just over seven million Raspberry Pis have been sold around the world.
Raspberry PI Models :
1- Raspberry PI 1 model B (2012).
2- Raspberry PI 1 model A
3- Raspberry PI 1 model B+
4- Raspberry PI 1 model A+
5- Raspberry PI 2 model A
6- Raspberry PI 2 model B (We use this).
7- Raspberry PI 3 model B (February 2016)
Raspberry PI Systems:
1- NOOBS :
1- NOOBS
2- NOOBS LITE
2- Raspbian
1- RASPBIAN JESSIE WITH PIXEL
2- RASPBIAN JESSIE LITE (We use this).
Raspberry Characteristics
- ARM CPU running at rates that range from 700MHZ to 1.2 GHZ depending on the version/model of the PI.
- RAM ranges in size from 256M bytes to 1 GB bytes depending on the version/model of the PI.
- On chip graphics processing unit (GPU).
- SD card is used to store the OS and data/program storage.
- Most PI boards have between one and four USB slots, HDMI and composite video output, and a 3.5 mm phone jack for audio.
- Lower level output is provided by several GPIO pins which support common protocols like I²C.
- The B-models have an 8P8C Ethernet port and the Pi 3 has on board Wi-Fi 802.11n and Bluetooth
- 8The Foundation provides Raspbian, a Debian-based Linux distribution for download, as well as third party Ubuntu, Windows 10 IOT Core, RISC OS as operating system for the PI.
Raspberry Project :
1- Deal With Smart House Automation .
2- Remote Control Reboots, Submarine .
3- Camera Streams .
4- Remote Monitor .
5- Smart TV6- Super Computer
we have 2 Methods to retrieve Database form Raspberry
1- Connect All Computer in Same Network
- Raspberry Connecting by wired cable to Switch and All Computer Connect at the same Switch
- Raspberry Connecting by WiFi Network by Dongle
- we upload local database of Raspberry into cloud server and retrieve Data
5 Implementation .............................................................................
5.1 Program , Read Temp On R.I.P
This is a modification of our original Python script but
We are adding code to handle the MySQL functionality.
Firstly, at the top of the script we add an import for the MySQLdb Python library we downloaded earlier.
A bit further down you will see variables that will be used when communicating with loacal MySQL (password, user, host etc) -!
“sql = …” is a string that we will send to MySQL as a command that adds our datetime and temperature values to the tempLog database. There is then a try statement that executes the sql command. If for some reason that fails the except code will run, printing a fail message and discarding attempted changes to the database. Play about with this code and try to change stuff, its the only way I learnt how to it works.
5.2 Database ...........................................................................
5.3 Pages........................................................................
in users settings
we talk about the exist user or not and ability of edit process
this page divide into 3 part
First part (Search part)
In Drop Down list you Choose what will be search (ID/Name) as you shown
in Text box you write/enter the Name or ID of user
Finally you put in Button (Search) to begin the search process
Second Part (Edit Part)
in this part have 6 Text box
in first text box is locked (User ID)
after this you can edit
1- user name : name of user
2- password
3- Name : full name of user
additional info
4- E-mail: E-mail of user
5- phone number of user
Third Part (Rank Part)
in the this part you have 6 check box (user rank / user type)
if user
1- Administrator (Manger of company)
2- Fridge Administrator (admin of Fridge)
3- Store Administrator (Admin of store)
4- users Administrator (Manger of users)
5- Store Employee (Employees of store)
6- Locked Account (Lock the Account)
in item settings
we talk about products and value of it
this page divide into 2 part
First Part (Search box)
in text box you enter/ write the full name product or part of name and will appear all product In first GridView
that has same name , the type of product/item and price
in Second GridView
that will show the id , Location_Name , CurrentBalance , MimQuantity , MxQuantity
when you Pressure in select what ever in 2 GridView you will move to second part
you can be able to change in 5 text boxes (item Name , Type , Price , Minimum quantity , maximum quantity and Balance )
and Drop Down list you Choose Location (Location)
and Drop Down list you Choose Location (Location)
and when you finished of changing value you have 3 button
1- save all change
2- clear all value in text boxes
3- Delete product/ item
In Store Page
7- Maximum Quantity : the biggest Quantity in fridge of product
8- Location : the location of fridge
9- Operation Type : the operation of input product (in) or out product (out)
10- Enter Quantity : you Enter your Quantity in database for new
In Store Page
this page divide into 2 part
First part (Search Box)
in text box you enter/ write the full name product or part of name and will appear all product that has same name In First GridView under the search box
it show (ID of product , Name of product , type of product and price of product)
in Second GridView
that will show the id , Location_Name , CurrentBalance , MimQuantity , MxQuantity
when you Pressure in select what ever in 2 GridView you will move second part
it shape the item settings (Search box)
Second part (Item Details)
this part you can see , it place you show the product information
1- item ID : the ID of product
2- item Name : the name of product
3- price : price of product
4- type : what the product type
5- Current Balance : the exact quantity of product now in fridge
6- Minimum Quantity : the Smallest quantity in fridge of Product7- Maximum Quantity : the biggest Quantity in fridge of product
8- Location : the location of fridge
9- Operation Type : the operation of input product (in) or out product (out)
10- Enter Quantity : you Enter your Quantity in database for new
and when you finished of changing value you have 2 button
1- save all change
2- clear all value in text boxes