Linux (28) Python (13) Raspberry Pi (5) Bugs (3) Install (3) C (2) Brainf**k (1) HTML (1) Maths (1) Sorts (1)

Monday, 12 November 2018

Bubble sort in Python vs C

Sorting algorithms are used to put a elements of a list into a certain order. One example of a sorting algorithm is the bubble sort. The bubble sort works by comparing successive pairs of numbers in the list and then stops when no more swaps are required. The bubble sort is not a very efficient sorting algorithm.

Thursday, 25 October 2018

Tethering the Raspberry pi to an android phone.

Tethering allows you to share the internet connection on your phone whether it be a WIFI connection or 4G connection.

On a Raspberry PI tethering does not happen instantly. Firstly we need to add it to the interfaces file.

Open the interfaces file:
sudo vi /etc/network/interfaces

Now we need to add the interface usb0 by adding the following line to the end of the interfaces file:
iface usb0 inet dhcp

Now we can bring the interface up by running the command:
sudo ifup usb0

You should now have a internet connection on your Raspberry Pi through your mobile phone.