Please make sure you are accessing the programs from a user having temporary root access. For the existing user,
Username: nips
Password: peach1395
Change to the directory newproject under home
cd ~
cd newprojectActivate the virtual environment with the help of source command. Make sure to do this every time, as without activating the virtual environment, Django will not work.
source my_env/bin/activateFrom newproject, go to the directory containing the Django Project
cd django_projectTo run the django_server, execute the following command in django_project directory
python manage.py runserverTerminal will print a few lines of output ending with "Quit the server with CONTROL-C".
Keep this terminal running and DO NOT close it.
You will be automatically redirected to a Log In page
Log In into the interface with the help of user credentials as provided above.
- Connect the Host computer of Web Interface to the network switch physically via Ethernet cable.
- Go to IPv4
- Select "Manual"
- Enter the Address as 10.114.10.80
- Enter the Netmask as 255.255.255.0
- Apply changes and close
- Turn your Wired network connection OFF and ON.
- If you wish to access the internet, then connect the ethernet cable to a server with Internet access.
- Go to "Wired Setttings > IPv4" and select the option "Automatic (DHCP)"
- Turn your Wired network connection OFF and ON.
Go to your favourite browser and after executing the previous command, type the following in the SEARCH BAR and hit ENTER.
127.0.0.1:8000
Alternatively, you can also type the following:
localhost:8000
You have now entered the Web Interface Page. If the page prompts you to log in, then you have executed everything correctly!
Make sure that you have logged in.
Also, NOTE that this procedure must be followed only for the existing robotarm+conveyor system (as of 20 July 2022). There might be changes in method of execution while integrating a new robot into the Testbed.
"Add image of web interface"
After logging in, you will be directed to the web interface.
-
Open a new terminal
-
ssh pi@10.114.10.85[password:
raspberry] -
Once you see "
pi@robotarm" on the terminal, you have now entered the Raspberry Pi. -
cd python -
python robot_arm_server.py
ROBOT ARM SERVER IS NOW RUNNING!
-
Open a new terminal
-
ssh pi@10.114.10.86[password:
raspberry] -
Once you see "
pi@conveyor" on the terminal, you have now entered the Raspberry Pi. -
cd python -
python conveyor_server.py
CONVEYOR BELT SERVER IS NOW RUNNING!
-
Open a new terminal
-
ssh pi@10.114.10.87[password:
raspberry] -
Once you see "
pi@hallsensor" on the terminal, you have now entered the Raspberry Pi. -
cd python -
python sensor_server.py
RPM SENSOR SERVER IS NOW RUNNING!
The client scripts have been stored on the Host computer of the Web Server, and will be executed by hitting the "Run" buttons on the interface.
-
Under the "Robotic Arm Command", on hitting the "Run" button, Robotic Arm will start working.

-
Under the "Conveyor Belt Command", on hitting the "Run" button, Conveyor Belt will start working.
-
You may choose Delay for the belt from the given options in the drop down menu. If you select a different value of Delay and execute the program again, the conveyor should move with a different speed.

-
Under the "Speed Sensor Output", on hitting the "Run" button, the RPM Sensor starts counting.

-
The function triggerred by hitting "Run" button wil dynamically update the RPM data at every rotation of conveyor motor into a MySQL Table.
-
In order to access the SQL Table, entr the following URL in a new browser page and hit ENTER.
localhost/phpmyadmin
- Log In into PHPMyAdmin with the same credentials as above.
- Go to ICS_Testbed > RPM_Count_Table
- REFRESH the page to see latest entries of RPM Value from the sensor.
- NOTE:- Set the "Sort by key" option tp "PRIMARY (DESC)" to see the latest entries at the top of the page.

- blog/views.py- Contains the functions responsible for execution of Client scripts- under functions "runbutton1", "stopbutton1", "runbutton2", "stopbutton2", "runbutton3". It also contains initialization of execution of commands into the MySQL Database.
- blog/templates/blog/home.html"- Contains the frontend functionality to the Web Interface.
- django_project/urls.py- Contains access to all URLs, where they would be redirected to, and functions to be executed upon redirecting.
- blog/templates/blog/base.html"- A base template from which other .html files inherit.
- django_project/settings.py- Contains basic configurations and additions based on apps included.










