Software apps and online services
- Download Raspbian and extract the.img file.
- On Windows, right-click on the Zip file in your downloads folder and click
- Insert the microSD into your computer's SD card slot via the SD card adapter.
- Next, you'll need to flash the Raspbian image to the microSD. There are various applications you can use to do this, such as Etcher for Linux, macOS or Windows.
- Open the SD card from your file explorer - the drive will be labelled
- SSH access is disabled by default. To enable it, create an empty file in the
- On Windows, inside the
bootdirectory, right-click in the white space, scroll to
Text Document. Enter
sshas the name.
- Connect the Raspberry Pi to your router via the micro USB to ethernet adapter and ethernet cable, and proceed to the next section.
- Create a new file in the
- Follow code step below.
- Download and install Notepad++ from here.
- Once installed, inside Notepad++ go to
File > Newto create a new file.
- In the top bar, select
Edit > EOL Conversion. Make sure
Unix (LF)is selected. It should appear disabled if it is.
File > Save as, navigate to your
bootdrive and call the file
- Paste in the code below labeled
Your-SSID with your WiFi network, and
Your-PSK with your WiFi password.
This file will tell the Raspberry Pi to connect to the specified network when it boots up.
Make sure your computer is connected to the same network as your Raspberry Pi.Booting up the board
- Eject the microSD card and insert it into the Raspberry Pi's microSD slot.
- Connect the
PWR INmicro USB on your Raspberry Pi to a 5v power source (e.g. your computer's USB port).
- Wait for the board to boot up - the green LED should stop flashing when it's finished booting up.
- If you have access to your router, you can login to it's admin panel via a browser. It's usually something like
- Look at the list of devices and find the IP address of your Pi. It should look something like
When entering a password in terminal or command prompt, you won't see it being typed, for security reasons. Simply type the password and hit the enter key.Option 2 - Scan using Nmap
The nmap command (Network Mapper) is a free and open-source tool for network discovery, available for Linux, macOS, and Windows.
- To install on Linux, install the nmap package. To do this, load your terminal and run the command
apt-get install nmap. (If it does not run due to permissions, try
sudo apt-get install nmap).
- To install on macOS or Windows, see the nmap.org download page here.
To use nmap to scan the devices on your network, you need to know the subnet you are connected to. First find your own IP address, in other words the one of the computer you're using to find your Pi's IP address:
- On Linux, type
hostname -Iinto a terminal window
- On macOS, go to
Networkand select your active network connection to view the IP address
- On Windows, go to the
Settings, then under
Network and Internet, select your connection type i.e.
Properties(for some this is called
- In here, you will see
IPv4 address. Now you have the IP address of your computer, you will scan the whole subnet for other devices. For example, if your IP address is 192.168.1.5, other devices will be at addresses like
In your terminal or Command Prompt, now use the nmap command with the -sn flag (ping scan) on the whole subnet range. This may take a few seconds:
nmap -sn 192.168.1.0/24
192.168.1 part in the command above should be replaced by the first 3 parts of the IP address you attained previously.
Ping scan just pings all the IP addresses to see if they respond. For each device that responds to the ping, the output shows the hostname and IP address like so:
Option 3 - Use the hostname
Starting Nmap 6.40 ( http://nmap.org ) at 2018-04-02 12:51 GMTNmap scan report for Conalls-MBP (192.168.1.4)Host is up (0.0017s latency).Nmap scan report for iPhone (192.168.1.45)Host is up (0.0021s latency).Nmap scan report for raspberrypi (192.168.1.8)Host is up (0.0038s latency).Nmap done: 256 IP addresses (3 hosts up) scanned in 2.21 secondsHere you can see a device with hostname raspberrypi has IP address 192.168.1.8.
By default, the hostname for the Raspberry Pi is
raspberrypi. If you cannot get your IP address, you can try using
- Open a terminal window, and run
ip-addresswith the one you attained in the previous step.
- You will be prompted to enter a password - the default password is
- Download Putty from here to allow you to communicate with your board via SSH.
Host Name (or IP address)enter the IP address for your Raspberry Pi.
- Click the
Openbutton to create the connection.
- Once you're connected to the Raspberry Pi via SSH, run
sudo apt-get install python-pipto install pip, a package manager.
sudo pip install wiato install the Wia SDK.
- Create a new directory for your project by running
- Navigate into this new directory by running
cd my-project. For this tutorial, we'll use python, but you can also use our Node.js SDK.
- Create a new python file by running
You can name the file anything you want, but make sure you don’t name it ‘wia.py’ as this will cause an ImportError.
- Edit the file with
- Paste in the code snippet below labeled
pythonto get started.
your-access-token with your device's secret key (you can find this in your Wia dashboard, it begins with
d_sk), and save the file by following the on screen instructions at the bottom.
- Run your newly created script by running
- Navigate to the Wia Dashboard and you'll see that your device is connected.
- Navigate to the 'events' tab, and you'll see an event has been published.