- Python 3
- Kivy (install via pip):
- Cython
- sdl2/pygame (either is fine)
- PyBluez (install via pip):
- Bluez devel package on linux
https://kivy.org/doc/stable/installation/installation-linux.html
pip3 install cython kivy pygame-(if no SDL2)
You might need some linux headers for PyBluez:
uname -r
To get kernel version, then:
sudo pacman -S base-devel linux-headers bluez-libs
sudo pip3 install pybluez
chmod +x /where-you-saved-it/code/python-go/AES
Then select appropriate headers for your kernel, and check you have appropriate graphics drivers installed (for OpenGL).
Tested on Ubuntu 18.04
uname -r
To get kernel version, then:
sudo apt-get update
sudo apt-get install linux-headers-<kernalversion> bluez libbluetooth-dev
sudo pip3 install pybluez
chmod +x /where-you-saved-it/code/python-go/AES
Then select appropriate headers for your kernel, and check you have appropriate graphics drivers installed (for OpenGL). If you encounter an error regarding OpenGl try:
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
cd /WherePythonIsInstalled/Scripts/
pip install cython pygame-(if needed) pybluez
https://kivy.org/doc/stable/installation/installation-windows.html
Execute in shell:
cd /WhereYouSavedIt/code/python-go/
(sudo) python3 start.py
Use sudo if you are using Bluetooth.
If you get a permissions error, make sure /WhereYouSavedIt/code/python-go/AES is executable. If it isn't, run:
chmod +x /WhereYouSavedIt/code/python-go/AES
If it crashes on start-up make sure your config file is configured correctly.
Go to WhereYouSavedIt --> code --> python-go and open start.py with Python 3.X.
If it crashes on start-up make sure your config file is configured correctly.
Since the app is not (yet) available on the Google play store, you have to build it manually and deploy it onto your android device (not available for iOS).
To do this, you will need Virtualbox, an android device, and some patience.
-
Enable USB debugging on your mobile device (look it up for your device).
-
Go to this site: https://kivy.org/#download and download the Buildozer virtual machine (scroll down to the bottom and it is in the "Vitual Machine (for Android/buildozer)" section).
-
Extract the zip, and click on the "Buildozer VM.ovf" file, and open it with virtualbox.
-
Follow the steps on Virtualbox.
-
Start the VM. Once in the login screen, the password is "kivy".
-
Copy the KivyPad folder from the source code of this project onto the VM somehow (either using shared folders, clipboard or drag and drop settings in Virtualbox).
-
Open the terminal and navigate to where the KivyPad folder is.
-
Make sure the buildozer.spec file is in that folder. If it isn't, download it.
-
Make a folder on the desktop called "VMOUT". This will hold the built application before it is put on the device.
-
Plug your device into your computer.
-
Go to Devices --> USB at the top of the virtualbox window, and click your device on the list.
-
You will probably have to tap allow on your device, so make sure you have your device unlocked ready.
-
Once you can navigate to the device in the file manager of the VM, run the following command in the terminal we opened earlier:
buildozer android debug deploy
and wait. The first time you run this, it may have to download the Android SDK, which will take a while depending on your internet speed.
"android" is the target, "debug" will build the code into an android package, and "deploy" will install it on your device.
-
Once this has finished, the app should be installed on your device. You can now shutdown the VM and unplug your device.
-
You will find the app in your applications menu on your device, as a home screen shortcut is not automatically made.
-
If you are having issues, you can debug the program by running:
buildozer android debug deploy run && buildozer android logcat | grep "python"
in the KivyPad folder while in the Kivy VM.
This project is for you to complete your project.
You're expected to complete the code by the end of the summer holidays. The submission is after the first half term break in year 13.
Use the wiki for documentation and notes.