Wednesday, April 26, 2017

Classroom Timer V1

If you have ever been a teacher at any point in your life, you would have realized the importance of keeping your students engaged and on task at all times during the short period every day that you get to spend time teaching them. If you have just 30 minutes per day, you want to maximize the learning by having a structured lesson plan that moves smoothly from Introduction to New Material to Guided Practice and into Independent Practice. And if you have planned for the lecture properly, you would know how much time you want to spend at each stage doing each activity with the kids to ensure that the lesson is completed on time and doesn't spill over onto the next lecture.

You may have a clock in your class, but having a countdown timer makes more sense in competitive and group activities. When the kids see the time ticking down, and they rush to try to finish the activity on time, it can give them an adrenalin rush and bring excitement to the activity.

I am an engineer by profession and passion. So during as a fellow at Teach For India, I was always looking for ways to enhance teaching through use of technology. And so I made a small classroom timer based on Arduino. The first version had a dot matrix display and switches. Soon, I figured that adding WiFi and controlling the timer using a mobile phone would allow the time to be permanently installed above the blackboard in the classroom and avoid the need to touch the timer repeatedly and hence avoid any breakage due to accidentally dropping the timer.

The first version based on Arduino UNO and 8x8 Matrix display
For the first version I used an Arduino UNO along with a 4 panels of 8x8 LED Matrix Displays. The left most 2 displays displayed the time remaining in minutes and the right most two displays were for the two digits which reported the seconds remaining. These display modules are powered by MAX7219 which allows you to control the displays using just 3 pins of the Arduino UNO. I connected the pins 2,3,4 of Arduino UNO R3 respectively to the DataIn_Pin, Clock_Pin, Load_Pin of the 4 module display. I powered the device using a portable power bank and put everything in a box. There are four switches connected to pins 8, 9, 10 and 11 of the Arduino which allows you to start / pause / stop the countdown as well as set the time that you want to countdown from in increments of 30 seconds.

There are four switches. When you power up the timer, it starts counting down from 1:00 (1 minute). You can pause this by pressing the stop button once, and continue the countdown when you press start button. If you press stop twice, the timer is reset to the last set value (1:00 by default). When the timer is stopped (press stop twice), you can use the up and down buttons to set a new reload time. Once you have set the time, you can press start to start counting down. the switches are wired in active low mode. There are pullups enabled on the 4 points. I have also added external pullup resistors. When the switches are presses, they short the corresponding arduino pin to ground.

Here is a video and photo of the internals:

The first time I set about assembling the device, I used a plastic box. Soon after the plastic box broke and the power bank mal-functioned and so I got a switch box and transferred all the circuitry to the new box. the new box was sturdier and looked neater!

Classroom Timer V1 in a better box


I have made use of the following 3 libraries:

  1. TimerOne - for using a Timer Interrupt to update the display once every second.
  2. LedControl - This one is used for interfacing to MAX7219 displays. I had to modify this library because I used the modules upside down.
  3. PinChangeInt - Since the 4 buttons are connected to interrupt pins, I have sued Pin Change interrupts to respond to button presses. 
Many of these libraries are continuously updated, and the newer version might not work with my existing code. Also I had to modify LedControl library as mentioned above - so I have created a github repository for the code as well as a library here:
In case you want to use the code, download the 3 library folders to your Documents\Arduino\libraries folder, then download the .ino file and put it in a new folder on your computer. make sure this folder has the same name as the .ino file. double click on the .ino file and use Arduino to download the code onto your Arduino UNO R3.
The ClassroomTimerV1.ino file is present in the github repo above and is also embedded as a gist below:

Tuesday, April 25, 2017 on LinkIt Smart 7688 Duo (OpenWrt)

Temboo-less tweeting from the shell

LinkIt 7688 Duo is a cheaper ($15.9 vs $74.95) and breadboardable version of Arduino Yun. Arduino Yun comes preloaded with Temboo whereas LinkIt does not have that preloaded. Temboo is a great go between service that allows your IoT project to talk to existing services like google drive, twitter or dropbox - but to do anything long term and meaningful with it, you have to upgrade from a free temboo plan to a paid plan - Arduino Yun is already expensive and this makes it even moire expensive. I used Arduino Yun and Temboo to make a shimmering lamp that reacts to tweets from your sweetheart - But now it was time to move on to better yet cheaper builds.

A Raspberry Pi running Node Red can achieve a lot but here I want to focus on LinkIt because I am using it as a part of a larger "art" project. Since LinkIt has an AVR microcontroller (Arduino programmable over WiFi and Arduino Bridge), it allows for greater flexibility in interfacing to sensors and modules via the microcontroller. Also, until someone (or me) ports Node Red to OpenWrt platforms, I would prefer to use bash scripts and Arduino code to get my bidding done.

So one of the first things on my agenda was to figure out a Temboo less way of fetching tweets. What is outlined below is how I got (which is a bash script to fetch tweets)to work on OpenWrt - more specifically LinkIt 7688 Duo. For this, we wont be writing any Arduino code since the Microcontroller does not come into play (yet). But what we will be doing is playing around with bash scripts and cross compiling 2 packages for OpenWrt.

My LinkIt 7688 Duo as a part of a larger project.
The LinkIt is the one in the middle. The one on a bottom is a 5V powersupply.
And the one on top is a dimmer circuit - similar to the one I used in my twitter lamp project

Step 1 - Cross compiling packages required by

Since is just a bash script, it requires certain packages to exist on your system. They are curl, jq, nkf, openssl. Of these openssl and curl can be installed on your LinkIt since they are a part of the OpenWrt repositories. But jq and nkf - these you will have to cross compile on a Linux PC and transfer them to LinkIt.

Here are the steps to make sure you have all the packages required by on your LinkIt:

  1. Connect your LinkIt to your home's WiFi network - check this
  2. Figure out your LinkIt's IP address - there are many ways to do this:
  3. Using my router's page to figure out the IP addresses of my 2 LinkIts connected to my home network.
    The MAC addresses of LinkIt begin with 9e:65:f9
    (Yes I have OpenWrt installed on my home router as well)
    Using Arduino IDE to figure out the IP addresses of LinkIt
    1. You may need to log on to your WiFi Router's page from your PC and look at the list of devices and IP addresses.
    2. You can install Arduino on your PC, add support for LinkIt 7688 Duo and then wait for a few moments till Arduino automatically discovers the LinkIt. Then you can look under Tools>Ports
  4. Use PuTTY to login to your LinkIt 7688 Duo. Login will be "root" and password would be whatever you set during the getting started stage.
  5. Lets install the basic packages that are required and available - execute the following commands on LinkIt over PuTTY:

    opkg update

    opkg install ip curl openssl bash nano grep getopt bc ca-certificates 
  6. We still need to install nkf and jq. For that, we will need to use a Linux computer - preferable one running Ubuntu and perform the following steps (on your Linux PC not LinkIt):
    1. Download OpenWRT SDK for Linux from here onto your x64 Ubuntu Laptop. (I used Ubuntu 15.10 x64 on a VirtualBox Virtual Machine - I used a virtualbox image from
    2. Extract the folder to your home folder:
      tar -xvf OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-
    3. Install some required build tools on your Ubuntu PC:
      sudo apt-get install autoconf build-essential
    4. Set the environment variables:

      export PATH=~/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-$PATH

      export STAGING_DIR=~/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-
    5. Change to ~/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc- :
      cd ~/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-
    6. Create two folders here:
      mkdir jq
      mkdir nkf
    7. Create the makefile for jq and place it in the jq directory that you just created. (Appended Below):
      gedit jq/Makefile
    8. Create the makefile for nkf and place it in the nkf directory that you just created (Appended Below)
      gedit nkf/Makefile
    9. Go back to ~/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-
      cd ~/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-
    10. And issue the make command:
    11. cd to the ourput directory:
      cd ~/OpenWrt-SDK-ramips-mt7688_gcc-4.8-linaro_uClibc-
    12. You will find the two .ipk files:
    13. Copy these two ipk files to your LinkIt 7688 duo. you can do this in many ways but the best way is to use scp protocol. In my case I simply copied the files from my Ubuntu Virtual Machine to my Windows machine and used WinSCP (Make sure file protocol is set to SCP) to login into my LinkIt and copied the .ipk files to the /root folder there.
    14. Issue the following commands to install jq and nkf on your LinkIt (Issue commands over PuTTY while in /root directory):
      opkg install jq_1.5_ramips_24kec.ipk
      opkg install nkf_2.1.4-1_ramips_24kec.ipk
    15. And you are done with installing the required packages
Here are the Makefiles for cross compiling jq and nkf

Makefile for nkf:

include $(TOPDIR)/





include $(INCLUDE_DIR)/

define Package/nkf
  TITLE:=Network Kanji code conversion Filter (NKF)

define Package/nkf/description
  Network Kanji code conversion Filter (NKF)

  prefix="$(PKG_INSTALL_DIR)" \
  MKDIR="mkdir -p"

define Package/nkf/install
 $(INSTALL_DIR) $(1)/usr/bin
 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/nkf $(1)/usr/bin/

$(eval $(call BuildPackage,nkf))

Makefile for jq:
#jq is written in C and has no runtime dependencies, so it should be possible to build it for nearly any platform. Prebuilt binaries are available for Linux, OS X and Windows.
#The binaries should just run, but on OS X and Linux you may need to make them executable first using chmod +x jq.
#jq is licensed under the MIT license. For all of the gory details, read the file COPYING in the source distribution.

include $(TOPDIR)/



PKG_FIXUP:=autoreconf -i

include $(INCLUDE_DIR)/

define Package/jq
  TITLE:=jq json interface

define Build/Compile
 $(MAKE) -C $(PKG_BUILD_DIR) CFLAGS=-msoft-float

define Package/jq/install
 $(INSTALL_DIR) $(1)/usr/bin
 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jq $(1)/usr/bin/

$(eval $(call BuildPackage,jq))

Step 2 - Cross compiling packages required by

Next we need to get onto LinkIt and configure it.
  1. Visit download and tweet.client.key to your PC and transfer it to your LinkIt using WinSCP. You can also download the two files directly to your LinkIt by issuing 2 commands over PuTTY:
    curl -O
    curl -O
  2. Mark as executable:
    chmod +x
  3. Now we need to configure the keys and add them to tweet.client.key on LinkIt. Visit and login to your twitter account.
  4. Next open a new tab in the same browser and visit
  5. Click on "Create New Apps"
  6. Enter something in Name, Description and Website
  7. Accept the Developer Agreement and click "Create your Twitter Application"
  8. Now click on your newly created application and click on "Keys and Access Token"
  9. Open tweet.client.key over WinSCP and copy and past key from the webpage to tweet.client.key
    1. Enter your twitter handle next to MY_SCREEN_NAME=
    2. Enter "en" next to MY_LANGUAGE=
    3. Copy the string mentioned next to Consumer Key (API Key) to CONSUMER_KEY=
    4. Copy the string next to Consumer Secret (API Secret) to CONSUMER_SECRET=
    5. Copy Access Token to ACCESS_TOKEN=
    6. Copy Access Token Secret to ACCESS_TOKEN_SECRET=
    7. Click save
Editing tweet.client.key
The original is published at but I had to fork it and make some modification to it so that it would run on OpenWrt. I have forked it at and that's what we have used. (Modifications involved creating symbolic links to stdin and stdout in proc file system - these are lacking by default in OpenWrt)

Finally everything is set and we can test our setup by fetching the latest tweet from - say - elonmusk, piping it through jq and printing only the unique tweet id and the text of the tweet itself:

./ search -q "from:elonmusk" -c 1 | jq '.statuses[0].id, .statuses[0].text' running in a PuTTY window with Twitter open in Google Chrome

Thursday, April 20, 2017

Dealing with WiFi IP Cameras and .264 files

On a recent visit to China, I purchased a cheap IP camera which looks like a robot:

You can get one online from amazon for twice the amount that you might pay for it when you buy it from one of the shops in ShenZhen (I got it for around 150 CNY or 1500 INR). The camera is supposed to be installed in your house where you can configure it to connect to your home's WiFi router. That way you can connect to the camera from anywhere in the world (using your web browser or smart phone app) and watch and hear what ever the camera picks up. Here are some of the features of this camera:

  • Tech Specs (you can find these on the amazon page as well, although the model might say something else)
    • Model: The packaging for my camera said "Mini Robot Wireless Camera H811 IP Camera"
    • Power: DC Input 5V 2Amps (via microUSB connector)
    • Image quality: 960P 1.3Megapixel
  • WiFi:
    • Out of the box, the camera defaults to WiFi master mode (i.e. wifi hotspot) . This is so that you can use the app on your smartphone to connect to it and if required, you can configure the camera to switch to client mode and connect to your home's WiFi router.
    • By default, when you look for it, the SSID of the WiFi signal emitted by the camera would be something like: "HSL-337026-GDDEN"
    • The default WiFi WPA2 key is 0123456789
    • Android app:
      • The app for your smart phone is called NetCam (Google Play Store link)
    • Computer:
      • In case you connect to the camera using a laptop, punch in the following URL into your web browser:
      • It will ask you for login credentials, enter "admin" as login and leave the password blank.
  • Reset button and microSD card slot:
    • The camera has a microSD card slot on the back. If you install a microSD card, the camera will also record the video (only video no audio) onto the SD card.
    • The small hole next to the camera on the back is for resetting the camera in case you forget its login password (this is separate from the WiFi password)
  • Physical structure:
    • The bottom part of the camera is made of iron and the camera head itself has a magnet in it. This allows you to screw in the bottom of the camera wherever you want and them attach the camera head and orient it in any direction you want.
    • The bottom of the camera also has a QR code which you can scan with your smart phone app to connect to it for the first time. The QR code has the WiFi Master SSID encoded into it.

So what did I do with the camera? I mounted it in my car as my dashcam. The problem is that the camera does not have a battery backed real time clock (RTC) and there is no internet (which would have helped re-sync the clock because the camera supports network time protocol or NTP) in my car so the camera does not maintain the time when I turn off the car (and power to the camera is cut). I use a 2 amp 5V smart phone charger that plugs into my cigarette lighter to power the camera. I could have connected the camera directly to the 12V battery and that would have ensure that the camera ran continuously and never lost time, but then my car battery would get drained as well.

I installed the base (made of iron) of the camera onto my rear view mirror and the camera heat got attached to the base thanks to the magnet present inside the head.

About RTC and NTP:
As mentioned above, this camera does not have any battery (neither Li-ion or coin cell) to main clock when the car is turned off. The camera can act as a WiFi client and can synchronize its time at boot up using an NTP server. But for I would need to get an internet connection for my car - possibly a 3G/4G hotspot. In cases where one does not want to do all that, there is a way out. The Global Positioning System is essentially made up of atomic clocks orbiting Earth. We can use a GPS receiver along with a WiFi capable microcontroller and implement the NTP server functionality. There is a tutorial on instructable on how to go about it: - what this instructable allows you to do is to make a small WiFi Access Point (using ESP8266) that doubles up as an NTP server. When you connect your devices (this camera or your smart phone) it would be able to access the internet but you can configure the NTP server address to point to this ESP8266 device and atleast your time synchronization will work. (Another similar project)

About handling the .264 media files on a Windows desktop
You can connect to the camera using the Android app to watch live video and configure the camera, but there is no way for you to review the video recorded by the camera while the memory card is inside the camera. The android app has no option to playback the recordings. The only way is for you to remove the memory card and insert it into a memory card reader and either connected it to your computer or to your android phone using a USB OTG cable.
The moment you remove the microSD card and insert it into a card reader and attach it to your Windows PC, this is what you see:

The camera fills up the microSD card with equal sized stub files

The camera has filled up the memory card with stub files. The camera starts recording the video into first file. When one file fills up (around 5 minutes worth of video), it continues recording in to the next file in sequence. This ensures that in case the power is cut to the camera (e.g. car accident/break in), atleast the last file would have been saved properly and would help in investigation.

Playing back on Desktop:
You can use VLC Media Player to play these .264 files. You have to make a small change in the settings:

  1. Select View>Preferences
  2. Switch to "All" under Show Settings
  3. Click on "Demuxers" under Input/Codecso
  4. Select "H264 video demuxer" from the drop down list and click Save
  5. Now you can drag and drop .264 files into VLC media player and play them back
  6. Make sure to change the Demux module setting from "H264 video demuxer" back to "Automatic" once you are done with playing .264 files. This will allow you to play your regular video files correctly.
Here are the screenshots to clarify the above steps:

You will note that when playing .264 files, you don't hear any audio. I am not sure if the camera records audio or not but, according to what I have read in discussion forums, no one has gotten any audio playback from these raw H264 format video files.

Converting videos on Desktop:
In case you want to convert the video to mp4 format, there are two steps that you have to follow:

  1. Use ffmpeg to convert the .264 file in to raw uncompressed AVI file. This will take care of stream errors which usually creep in when the power supply to the camera (like in a car) is not reliable or when the camera experiences vibration.
  2. Use ffmpeg to convert the uncompressed file to mp4

Here are the steps in the conversion process:
  1. Visit and download the latest stable, static 32bit version.
  2. Unzip the file into a folder on your computer.
  3. Move your .264 video file into the bin folder of the ffmpeg folder
  4. Open a command prompt and cd to the ffmpeg/bin folder
  5. Issue the command ffmpeg -i apf00047.264 -vcodec rawvideo -y output.avi
    This will begin converting the file apf00047.264 into a raw uncompressed file.
    During the conversion process, ffmpeg will display a number of messages about finding errors in the stream and compensating for it. Once the conversion process is done, you will realise that the 64MB file has been converted to an .avi file occupying 6.8 GB of space. You can try playing this file in VLC player (make sure to set Demux module back to Automatic)
  6. Finally you can convert the uncompressed avi file to mp4 format using the command:
    ffmpeg -i output.avi output.mp4
    Once that is done, you can delete the output.avi uncompressed video file. The output.mp4 video file can be uploaded to Youtube and Facebook if required. The .mp4 file can also be played using VLC player. It of course wont have any audio - that's the issue of the camera. The output.mp4 would be around 107 MB in size.
Here some screenshots outlining the above steps:

Downloading the ffmpeg utility for Windows

Copy your .264 video file to the bin folder within the extracted ffmpeg folder

Opening a command prompt and navigating to the ffmpeg's bin folder

Issuing a command to start conversion of .264 to uncompressed .avi format
ffmpeg spews messages regarding stream errors while creating uncompressed .avi file
The uncompressed output.avi file is huge - 6.8 GB
You can play the uncompressed output.avi in VLC Player

Executing ffmpeg a second time to convert uncompressed .avi to .mp4 format

Playing output.mp4 in VLC Player

Playing back on Android Phone:
You can use a USB OTG cable along with a card reader to connect the microSD card to your android phone. Once you do that - and if your phone supports USB OTG - a notification will pop up allowing you to explore the files on the microSD card. Now you can use this file explore feature and long press the .264 file that you are interested in to select it. Once selected, copy it to your phones internal memory. Then start the MX player app. The MX player (Free version with ads | pro version) app scans the phone's memory for video files, and this .264 file will show up as well. Just tap on it and the video will start playing.

Use the OTG Cable to connect card reader to the Android phone.
Explore the file using Android's builtin feature an copy the files to phone's internal memory.

MX Player app shows the recently copied .264 video file.

Tap on the file to play it.

Thursday, February 23, 2017

Arduino code for ESP8266 to take readings from DHT11 and upload them to is a great data broker and visualization platform for IoT devices. Up until now it was out of reach for ESP8266 fans because the Arduino environment for ESP8266 did not support SSL/TLS connections. But now it does. So here is how to get HTTPS working on ESP8266 using Arduino IDE and upload readings from DHT11 every 10 seconds.

ESP8266 and DHT11
 Steps for Windows computers:

  1. Install CP2102 drivers for the USB-UART chip onboard the ESP8266 NodeMcu v1.0 board
  2. Get the latest offline Arduino IDE Windows Installer from
  3. Install Board support for ESP8266 in your Arduino IDE, follow instructions here:
  4. Assemble your ESP8266 and DHT11 circuit. You will need 3 jumper cables and a breadboard to connect 3 signals from ESP8266 to DHT11 module. Connect pin marked D2 on ESP8266 to DHT11's data pin. Also supply 3.3V and GND from ESP8266 to DHT11's Vcc and GND.
  5. Plug your ESP8266 into your computer's USB port using a microUSB cable.
  6. Get a free account on, create a new bucket and make a note of the Bucket key and Access key.
  7. Download shown below and open it in your Arduino IDE
  8. Modify 4 things by supplying your own:
    1. WLAN_SSID
    2. WLAN_PASS
  9. Download the code into your ESP8266 board and watch it go! Keep the Serial Monitor within Arduino IDE open to watch what data is being sent to
Data received on
Watch the code go on Serial Monitor

Sunday, January 15, 2017

Scanning X-Ray Films

So Recently - because of binge running - I ended up with pain in my right thigh. So I had to visit an orthopedic doctor who diagnosed me with a pulled sciatica. We got an X-Ray done to make sure it wasn't the spine that was digging into the nerve to cause pain. It wasn't. No I usually digitize my medical records myself - the prescriptions and lab reports. This time I had an X-Ray film that I needed to scan with a regular scanner.
Drawing inspiration from here is what I got:

Trial 1: Regular scan on Epson L550. Regular settings

Trial 2: My friend has a Lenovo yoga 500 laptop - the one whose screen can be
flipped 360 degrees and turned into a tablet PC. I did just that and used it as a backlight
for the X-Ray film. I created a 1920x1080 sized image in mspaint with nothing but white in it.
I used IrfanView to display the image fullscreen and placed the laptop over the X-Ray film on the scanner.
Performed the scan with regular settings and got immediately improved results!
All I needed to do was to somehow remove the magenta and light green lines caused by scanning the screen.
Some sort of diffuser was needed.

Lenovo yoga 500 as a backlight
Lenovo Yoga 500 as backlight

Trial 3: Used a copier paper as a diffuser between the tablet PC screen and X-Ray: No Joy

75 gsm copier paper as diffuser

Trial 4: Used "Clear Plastic Folder Sheet" as diffuser between the X-Ray and backlight (Tablet Pc screen) :  Perfect

Folder sheet as diffuser

Tuesday, December 20, 2016

Setting up TL-WPS510U Wireless Print Server

HP LaserJet 1020 plus working fine with TL-WPS510U wireless print server

We have an HP LaserJet 1020 plus which we wanted to share on our network. Since this is a printer which only has a USB port, it can be shared by connecting it to a windows computer and sharing the printer via homegroup. But this required us to keep the connected computer on all the time.

So I decided to try out the TP-Link Wireless Print Server TL-WPS510U. In India it costs around ₹5000 and so it makes sense for anyone to go for this device to retro fit your old printer into a a network capable one.

But there is a caveat. The supplied CD which allows you to configure the software won't work on any PC. The TL-WPS510U is configured to join an "Ad-Hoc" WiFi network named WLAN-PS. The supplied software on your CD, makes your PC join this Ad-Hoc network and then sends commands and credentials to the TL-WPS510U over this Ad-Hoc network and instructs it to join to your home/office's WiFi network (i.e. your WiFi Router which operates in infrastructure mode).

Now now all WiFi adapters support Ad-Hoc mode. So the software on the CD supplied with TL-WPS510U will not work on all computers. To check if the WiFi adapter on your PC supports Ad-Hoc mode, type the following command in the Command Prompt Window (Press the Windows Key + R and type cmd and press enter):

netsh wlan show drivers

I executed this command on two of the computers I have access to. Check the field "Hosted network supported". If it says "Yes" then your computer can host ad-hoc networks.
The Intel(R) Dual Band Wireless-AC 3165 does not support ad-hoc mode
 Intel(R) Dual Band Wireless-AC 3160 does support ad-hoc mode
Sometimes it might be possible to upgrade your WiFi Chipset drivers and have the ad-hoc capability enabled in the new drivers. But if that does not work for you, make sure you run the CD that came with TL-WPS510U only on a computer that supported hosted networks. Before you run the CD on a particular computer, will need to make sure that the computer has the target printers drivers pre-installed on it. To do that, connect the printer to your computer via USB to the computer and install the driver from the CD supplied with the printer. And once that is done, you can go ahead with setting up the print server for it.

Once you have configured the TL-WPS510U and gotten it connected to your network, you will need to go to each computer on the network and configure them to be able to use the printer. To do that, make sure you have the printer drivers installed on all the computers that you want should be able to print to the printer over network.

Now you can run the CD on each computer you wanted to connect to the printer. When you are doing so, make sure to select "Setup Wizard" instead of "Easy Setup". We use "Easy Setup" on on the first computer when we are trying to configure the TL-WPS510U to connect to our home/office WiFi. For all consecutive computers on which u want to use the printer, select the "Setup Wizard". Once the printer server has connected to the network, you no longer need the computers to support "Hosted network" to be able for it to print to the printer via the print server.
Select Setup Wizard on all consecutive computers

In case you want configure the computer to connect to a printer over the network via print server - without using the print server driver CD, go to "Devices and Printers" and click on "Add a printer". Click on "The printer that wasn't listed" and then from the following screen click on "Add a printer using TCP/IP address or hostname".

If you were using the CD, the support software would have automatically discovered the print server on your network. But while performing the steps manually, you will need to know the IP address of the print server. To do that, you can look up the list of devices and the IP addresses assigned to them from your WiFi router's admin console. It is recommended that you assign a static IP address to the print server during initial configuration (i.e. when you are running the CD to connect the print server to the network).

Once you go ahead with selecting "Add a printer using TCP/IP address or hostname", you will need to know the setting to use with the print server, here are the settings (Change the IP address to your own print server's IP address)

After this screen, it will ask you to select the make and model of the printer that is attached to the print server, make sure that you select the correct one.

Sunday, December 4, 2016

ESP8266 + DHT22 + Arduino + Web Server

So here is a modified version of how to get a DHT22 working on ESP8266 NodeMcu board using the Arduino IDE (not Lua)

The project is based on:

  1. Get the components and assemble them. In India you can find these on
    1. NodeMcu ESP8266 | Link
    2. DHT22 | 
    3. Male-Male Jumper Wires | 
    4. Bread Board | Link
    5. MicroUSB cable | 
  2. Assemble the circuit as shown. Connect the Data pin of SHT22 to D2 of NodeMcu (which is referred to pin 4 in Arduino IDE)
  3. Install the driver for USB-Serial chip on your PC:
  4. Install Arduino on your computer and install support for ESP8266 Board, refer:
  5. Install the DHT-sensor-library-master library as outlined here:
  6. You would need to download and place Adafruit_Sensor.h in this same library folder as well. Get that file from:
    Click on "Raw" to get the file.
  7. Copy the code below, and download it into your ESP8266 NodeMcu board. Make sure to select the proper board and COM port.
To test:
  1. Connect your mobile to the WiFi hotspot created by ESP8266 : Temperature_Server
    Password is:
  2. Make sure to turn off the 3G data connection on your phone. Andorid will report that the wifi network "Temperature_Server" does not provide internet access. Ignore the message.
  3. Open chrome and punch in in the URL field and ESP8266 will serve you with the latest reading from the temperature sensor.