Here goes a simple JAVA code to convert rupees by using the online yahoo exchange rates. package com.oksbwn.currencyRate; import java.io.IOException; import javax.swing.JOptionPane; import org.apache.http.client.HttpClient; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.*; import com.oksbwn.popUp.popMe; public class YahooCurrencyConverter { @SuppressWarnings({ “deprecation”, “resource” }) public float convert(String currencyFrom, String currencyTo) throws IOException { HttpClient httpclient = new DefaultHttpClient(); HttpGet httpGet = new HttpGet(“http://quote.yahoo.com/d/quotes.csv?s=” + currencyFrom + currencyTo + “=X&f=l1&e=.csv”); ResponseHandler responseHandler = new BasicResponseHandler(); String responseBody = httpclient.execute(httpGet, responseHandler); httpclient.getConnectionManager().shutdown(); return Float.parseFloat(responseBody); } public void convertToRs() { String to = null; String amnt =…
Read MoreYear: 2017
A Transparent screen to lock the Desktop.
In this code i am sharing the code to lock the PC screen by using a transparent JFrame so as to restrict others to use it.The frame disappears only when the user enters the right username and password.This enables the user to let the background tasks going on and lock the screen.This has the only problem that it can be closed by the task manager.If you find a solution to it please let me know. package com.oksbwn.systeminteraction; import java.awt.Color; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import…
Read MoreOpenHAB Installation on Raspberry Pi
[sg_popup id=”3″ event=”onload”][/sg_popup] This video is around how to install OpenHabian with Raspberry Pi to get started with home automation. This is the 2nd video around OpenHAB and if you want to know how to install openHAB to windows PC make sure to check the earlier video and link is given below. About OpenHAB, its simply an open-source home automation system developed using JAVA and it lets you automate your home with support for tons of smart home devices., It has got a lot of cool features and I will…
Read MoreSetting up Amazon Echo Dot (Indian Variant)
Recently we got the Indian variant of the Amazon Echo Dot which Amazon has started shipping this Nov in India. Being a Home Automation Enthusiast I was eagerly waiting for that and is desperately into checking out the features of the Echo Dot with my DIY Home automation System. But before publishing video around Echo Dot with OpenHAB and my Automation System this post is about setting up the Echo Dot when you are using it for the first time, which is actually pretty easy. So stay tuned for upcoming…
Read MoreAccess Watchdog Timer of Raspberry Pi using JAVA
This tutorial is all about using the watchdog timer of Raspberry Pi by using JAVA. For this, we are going to use Pi4J library. Watchdog Timer: “A watchdog timer (sometimes called a computer operating properly or COP timer, or simply a watchdog) is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly resets the watchdog timer to prevent it from elapsing, or “timing out”. If due to a hardware fault or program error, the computer fails to reset the watchdog, the timer will elapse and generate a timeout signal.…
Read MoreNATASHA: AI assistant using Raspberry Pi
This video is around AI Assistant, Natasha with a voice interface. She can do all basic stuff, identify your voice, can read out text from images, can control devices in your home making them more interactive, and lots more.Apart from that, she can understand the local language, which in our case is Hindi. The whole project is developed in Python. This project is made open source.To view more of this project, and contribute to it, Check the GitHub link: http://bit.ly/2ldEI5X
Read MoreProgramming Linkit Smart 7688 DUO using Arduino IDE
[sg_popup id=3] In this tutorial, we will see how to program the Atmega324 controller of Linkit Smart 7688 DUO module using the Arduino IDE. The boards come in two flavors, Linkit Smart 7688 and Linkit Smart DUO. The difference between both is that the DUO has an ATMEGA324 controller apart from the main MPU which can be programmed using Arduino. In DUO module GPIOs of both the MPU as well as MCU are exposed and some are even multiplexed. The MCU can also be interfaced or controlled using the MPU…
Read MoreESP32 : Programming using Arduino IDE
[sg_popup id=3] ESP32: ESP32 is highly-integrated with inbuilt antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules. ESP32 adds priceless functionality and versatility to your applications with minimal Printed Circuit Board (PCB) area requirements. (Source: http://bit.ly/2yr3R1o) this video is around how to get started with ESP32 and programming it using Arduino IDE. This video shows a simple example of printing out some data to the serial console from the ESP32 module programmed using Arduino IDE. To enable programming of the ESP32 module from Arduino IDE we…
Read MoreMongoose OS Installation on ESP8266 and GPIO Access
This video is around ESP8266 module and how to flash mongoose OS to it.It also demonstrates some basic GPIO programming using javascript.Mongoose OS claims as an Operating System for commercial connected products with features like Security, OTA Updates, Remote Management. As Arduino framework is not reliable to run in production environment its a good alternative with Arduino compatibility layer that allows using existing Arduino drivers for prototyping. It is both C/C++ ready for production and JavaScript is for fast prototyping on the target hardware. The JS API calls C API.…
Read MoreOpenHAB: Installation on Windows for Home Automation
OpenHAB is a vendor and technology agnostic open source automation software for making home automation easier. This video is around how to get started with OpenHAB 2. In fact, this is going to be a series of video around it as I have completely shifted towards OpenHAB for my home automation system. Earlier actually I was using my own automation system built on PHP, JAVA, and MongoDB and it was becoming hard for me to manage that and so I thought of getting into already existing automation system and with…
Read More