Skip to main content

Posts

Showing posts with the label Programming

Building Autonomous Drone with Raspberry Pi and APM 2.8

I am a total newbie to hardware and was pushing my limits to see how far I can reach on with hardware projects (which sparked my interest lately). I have set out on a very ambitions mission  to control a drone from raspberry pi .I began the research for this around 2 months ago and had brought a raspberry pi, drone body kit and apm flight controller. The key difference of this project from common drone projects is that I'm trying to avoid the use of and RC and instead use the raspberry pi to control it.  Hardware Ins tallation Setup: I am using APM 2.8 and Mission Planner. I am using RPi 3 to control the APM 2.8 via Telem port of APM I am planning to power the apm via the battery to ESC (Electronic Speed Controllers) Now, documenting my steps below: Day 1 Watch Tutorial To get started with APM flight controller, I watched this video tutorial [1] which gives a gentle introduction about APM board.  Setup APM board and Calibrate Sensors I downloade...

Programming Raspberry Pi by Examples

Example 1: Programmatically controlling the LED Join the Raspberry Pi Course ( link )  Implement LED connection in the course week 2 lecture ( link ) . Example 2: Using the DHT11 - Humidity and Temperature Sensor with Raspberry Pi: The example in Uugear ( link ) did not work because my DHT11 had the pins in different order the pins were marked + and - rather than S, V and G. So I connected : + symbol in DHT11 ------> 3.3V - symbol in DHT11 ------> GND out symbol in DHT11 ------>  pin GP4 Also I used this github library (easy to understand) : https://github.com/szazo/DHT11_Python Example 3: IR Controlling your TV and AC with Raspberry Pi These 2 tutorial were followed to do this example: 1. http://www.raspberry-pi-geek.com/Archive/2015/10/Raspberry-Pi-IR-remote (main) 2. http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/ (helped to resolve issues) 3. https://blog.bschwind.com/20...

Datamining with Rattle for R - My Talk at GDG, Trivandrum 2015

With rest of the speakers/co-ordinators Recently, I got a fantastic opportunity to be a speaker at Google Developers Fest 2015, Trivandrum. It was a wonderful topic I enjoyed learning and sharing. Data Mining with R for Rattle : And here is me on stage:

Learn Awesome Mnemonic Hacks and Help Build New Ones @ Spellogram.com

Mnemonics are cool techniques that are immensely helpful remembering facts. Be it anything from spelling of english words  to  quantum physics , you can make a mnemonic to learn it.  For example:  The spelling of ' SEPARATE ' is one of the the most commonly misspelled word in English language.  "There is A RAT in sep ARAT e" - visualizing and remembering this sentence will help anyone recall the spelling of separate quickly without mistake.  Another example is the spelling of 'necessary' Just remember the sentence 'Shirts have 1 collar and 2 sleeves' to avoid misspelling the number of 'c' and 's'.   It's a clever idea to keep these tricks under your sleeves to impress your friends or teachers with your new exceptional memory powers.  A trick to recall the first10 element of periodic table is to just remember :  "Henry Hester Likes Beer But CanNot Obtain Food Now" Elements: Hydrogen, Helium, Lithium, B...

Data Mining & Analytics with R : Running R Scripts and Data Mining Techniques - Day 2

Warning: These are my messy study notes, much better legible notes can be found here  http://onepager.togaware.com 1. A Tour Thru Rattle Transform Tab ( by no means near to the full power of underlying R) Data Mining Tabs - Cluster, Associate Model Log Tab  - Capture the corresponding R command Working from Left to Right on Tabs  Remember to Click Execute Button 'Save' -> Projects save the current state, all models etc. 'Open' Projects can be restored at a later time You can even load it back to R  2. First R Program Load rattle and ggplot2 library(rattle)  # Provides the weather dataset  library(rattle)  # Provides the ggplot() function ggplot -> Grammar of Graphics : Just like english grammar or grammar of a computer language. A result of Hadley's Phd . Look him up to learn more details. Then produce a plot using ggplot() # handsondatascience.com - tips on elegantly writing repeated code ds ...

Hadoop The Definitive Guide [Book] - Study Notes

Chap-1- Meet Hadoop Requirement and adoption in yahoo. A framework that can scale to the web. Map and Reduce acitivity and features like data locality. Can be applied with a variety of algorithms Huge data processing can beat good algorithms Chap-2 - MapReduce The Map Java class and Reducer Java class The Job java class Jobtracker and tasktracker Hadoop reduces the input to input splits or just splits Map tasks write the intermediate output to local disks, so that they can be discarded after use. Outputs of Reduce tasks are stored in HDFS Combiner function can be run on map output, and the combiner functions output forms the input to the reduce function Hadoop streaming proivide hadoop apis in languages other than Java Chap-3 - The Hadoop Distributed Filesystem Fault tolerant solution. Same data written at multiple places. Filesystems that manage the storage across a network of machines are called distributed filesystems. Blocks - a block size is the minim...

How To Publish An Apple Watch App To The AppStore

The Apple Watch launch is almost nearing at the time of writing this article. I'm all excited and ready to submit my first Apple Watch compatible application to the AppStore. I'll write down my learning experience here so that you can publish your own Apple Watch application to the app store . I'll do this step by step, as the work of my current app progress. This article will be updated over time until I reach the final step to see it live in the AppStore. Step 1 : Make the iPhone Part of the Apple Watch An Apple Watch app is not much different from an iPhone app. In fact, it is a sub-part of the main iPhone application running on the iPhone and the Watch App merely acts as the extension of the parent app in the iPhone. So essentially, need an iPhone app anyway. In this scenario, I'm thinking of building an app that will be useful both on iPhone as well as the Apple Watch, instead of solely focusing on the the Apple Watch aspect. The app will be very simple, but al...

Learn Apple Watch Programming Quickly by Examples - My January Challenge

Apple Watch is soon to release, and being a huge Apple Evangelist, I've been very eager to explore the possibilities of what one can make with these 'Most personal device ever made by Apple'. My hopes are high. I'm in a constant mission to excavate this area at the earliest. And guess what, me and my friends have been working on a couple of interesting 'Apple Watch' things lately: 1. Creating a course - ' Learn Apple Watch Programming Quickly By Examples ' 2. Creating a website for Apple WatchKit Tutorials Both are in beta and will be public soon.  I'm trying to get the latest releases of the WatchKit sdk (which is bundled in Xcode 6.2 beta and higher and is required to build Watch Apps) and trying to publish tutorials on new APIs as and when they come. Following are my objectives with both these online ventures Teach things more by examples and less by theory Convey ideas at the simplest form possible Keep user-interaction at the heart ...

I'm Live Blogging : AndroidWear and Good Programming Practices - Google Developer Group Trivandrum DevFest 2014

Android Wear  Notifications done for android apps will automatically come to the AndroidWear without any extra coding. Main UI Stacks  Pages - Multiple Glancable Pages Replies - Via Voice Commands etc Development Option Make Apps Specifically For AndroidWear Most apps will have a companion app in wear and main app in phone. SOLID - Principles of OOP Robert C. Martin ( Uncle Bob) Agile Software Development: Principle, Patterns and Practices objectmentor.com/omTeam/martin_r.html Google compute engine  There was a over view of less heard about technology - Docker. This is massively helpful for sys admins to spin up vm's and deploy quickly. Rapidly reduces the total turn around time.  Resources Docker.io Blogs mentioned to read Wired.com

I'm Live Blogging : Polymer, Webcomponents - Google Developer Group Trivandrum DevFest 2014

Overview  Started (by +Arun Shanker Prasad  ) with a slight intro and kicked-off with an overview of a data science application that was built by the Qburst (Company) team. And then moved over to Web Components and Polymer. Parser Combinators for Event Detection Presenter :   +Navin Philip  ,  Associate Architect, Qburst A beautiful project data-crunching app that utilises the Theory of Computation to verify and quantify different hypothesis and give useful results. Had a quick demo. d Web Components webcomponents.org Presenter : Shyam, Qburst Why Web Components? You could import/export encapsulated custom components. There are 4 main technologies in web components. Eg:  Make a Facebook like button without importing javascript. Include maps in a page.  googlewebcomponents.github.io customelmeents.io Polymer , X-tags( (Mozzila), Bosonic (Independent)  Templating New templating tags in html. ...

Java : Get the Values In An Annotation Using Reflection

Recently I was researching on implementing lucene search (using Hibernate Search). Although I found success with it, I wanted to automate the process of passing the fields that are indexed and their respective index names. Hibernate Search uses a bunch of annotations in the getter to specify their index name and filters used. My Requirement I want to go through all the 'Field' annotation present in every method defined inside my class and get the value of the 'name' field from it. Sometimes 'Field' is present inside as a nested annotation inside 'Fields'. Here the tricky part is where you've to set YourAnnotation ann =  method.getAnnotation(YourAnnotation.class) and get an the annotation object from it. Here is an example problem: Here is the solution: And here is my output... 

How To Install Maven In Windows 7 64-bit

In today's programming culture it's essential to know some more stuffs apart from the language you code with. I learned the importance of this insight as I was flipping through the book 'Well Grounded Java Developer' . I've come across the title of this book several times only to overlook it meaning  in depth, murmuring 'Ha! another book for java newbie'. But it turned out that I was totally wrong and it taught me a lot about programming (including Java) and other things like test drivent development, build and continuous integration (maven) etc. All these were the buzz terms I've been hearing a lot for the last one year but left unlearned so far. The WGJD was an awesome start-off. Maven, is one concept I got wrong from the beginning, we've bee using it at our work place as an eclipse plugin for around a year now and I was under the notion that it's 'just a plugin'. Later from the book I understood, maven is a continuous integration...

Hibernate Search Overview Tutorial

Hibernate Search enables your Java based web application to search huge number of records in the database in a very short timespan. It gives you the functionality as good as the big players like Google and Yahoo. Due to the vastness of information available today and the chaos it makes, a search box has become an integral part of any application that's launched now. The Hibernate search is designed with to work for such kind of scenarios. The best thing is, its easy to integrate. Once you learn the concepts, you can integrate it to your current application while you sip your coffee and see the results in seconds. The complex areas of search index creation, traversal etc are done by Hibernate search silently behing the scenes. Amazon.com is a typical example of a web application offering brilliant search service. Most of the time users don't know exactly what they are looking for, it's the search engines responsibility to "guess" the users mind with the most releva...

Is MacBook Air Good For Programming / Blogging ?

I'm a passionate java developer who just migrated from a Windows PC netbook ( Dell mini ) to a 13 inch MacBook Air. Before the netbook I owned a Dell inspirion 1501. I'm quite a bit of an avid blogger as well. I purchased Dell mini just as it was launched hoping that it's compact and mobile architecture would solve all of my need as a programmer and a writer. Unfortunately it turned out that it was a worthless device.The rest of the story goes... Do Not Compare a Netbook With MacBook Air MacBook's astonishing features far exceeds anything that of a normal Netbook. Before Buying a netbook for programming and blogging was one of the biggest blunders I ever made on choosing a machine. The screen was 11 inch and clumsy icons of the Windows were a disgrace all the time. The tightly arranged keys in the keyboard made typing a pain. It's slow Intel Atom Processor is too sluggish to run even VLC player. After  The Mac's backlit spacious keyboard layout,...