Posts

Let's try MPLab!!!

Image
MPLab to Program the PSLabMPLab© X IDE Microchip® is a famous company for PIC® microcontroller manufacturing. This American based company produces a variety of electronic components ranging from basic microcontrollers, EEPROMs, SRAMs, RF devices and many more. In the PSLab device by FossAsia, we use a PIC24EP256GP204 who's data sheet can be found from here. Apart from the high performing micro controllers, Microchip provides a powerful IDE to program these devices. This IDE is based on NetBeans IDE. The programming language is consists of C++ syntaxes and we can embed assembly commands like 'nop' to simplify the code. Documentation and guidelines on how to use this great IDE is available on their official web site. Here we're going to see how to install this in an Ubuntu 16.04 64bit PC. Installing MPLab© X IDEStep ITo install this software, first we have to download the tar ball containing the installer. The latest version can be found from their official site. Scroll t…

Daily Scrums - GSOC '17

Image
2017 - June - 03What did I do yesterday? After a previous PR of UART.c got merged, there were merge conflicts in every other PR made after that. I tried to resolve them on Github editor but it was getting messy because they are all heavily correlated. So I closed the conflicted PRs to open them again with fixes. Opened up an issue #21 to fix the project tree and made a PR on #22Reviewed #141 in pslab-android Started separating ADC functions Discussed about the hardware modifications I did on pslab-hardware and made the necessary changes Discussed about navigation views in "Applications" view mock-up What do I plan to do today? I am going to fix all the merge conflicted files and send clean PRs to I2C, SPI, NRF and ADC to fix #14, #15, #16, #17! It would be better if the current PR gets merged as these files are heavily inter-related! Implement a hierarchical block in pslab-hardware…

Guidelines

Setting up environment for MSDProject
For this we need the following software and tools
JDK 1.8Eclipse Neon or OxygenApache TomcatMYSQLSpring LibrariesApache Commons Libraries
Download and Install the latest JDK [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html]Setup path variables for JAVA_HOME and make sure JAVA is configured properly [https://www.java.com/en/download/help/path.xml]Download Eclipse Installer from [http://www.eclipse.org/downloads/]Once the installer is open, select "Eclipse IDE for Java EE Developers"Download and Extract TOMCAT for windows [https://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html]Setup path variables for TOMCATDownload Spring jar files [http://repo.spring.io/release/org/springframework/spring/4.3.4.RELEASE/spring-framework-4.3.4.RELEASE-dist.zip]Download apache commons logging jar [http://commons.apache.org/proper/commons-logging/download_logging.cgi]Create a Github account [www.github.com]Dow…

Installing TOMCAT

Image
Apache Tomcat Web Server
How to Install and Configure?
I had to use Java Spring framework for one of my projects and I needed to install Apache Tomcat Server to run the code I write. I've followed many tutorials but they were all stuck in the middle. Then I thought of writing a tutorial here to help installing it to anyone who needs the great Apache!

The Skyline Problem

Image
Lab3.2 The Skyline Problem
The skyline problem is defined as given n rectangular buildings in a 2-dimensional city, compute the skyline of these buildings, eliminating hidden lines. The main task is to view buildings from a side and remove all sections that are not visible. All buildings share common bottom and every building can be represented by triplet (Left, Height, Right)

As an example, if the buildings array is
[ [1, 11, 5], [2, 6, 7], [3, 13, 9], [12, 7, 16], [14, 3, 25], [19, 18, 22], [23, 13, 29], [24, 4, 28] ] then the skyline is
[[1, 11], [3, 13], [9, 0], [12, 7], [16, 3], [19, 18], [22, 3], [23, 13], [29, 0]]
copyrights

Finding the Odd Occurrences of a Number

Image
Lab3.1 Finding the Odd Number of Occurrence
You are given a sorted list of numbers where one number appears odd number of times. All other numbers appear even number of times. You are required to design an efficient algorithm to find the number that appears odd number of times. I'm using the Use Divide and Conquer method which runs at $\Theta(\log(n))$

As an example, if the sorted list is
[1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6] then the odd occurrence number is 2

Reverse a Nested List Recursively

Lab2.2 Reverse a Nested List Recursively
You are expected to write a python program to reverse a list which may have nested lists within it. The number of nesting levels is not limited.

As an example, the reversed list of
[1, 2, [31, 32], 4, [51, [521, 522], 53], 6] will be
[6, [53, [522, 521], 51], 4, [32, 31], 2, 1]