Translate

Why would Sencha Touch build fail?

Today I was trying to build and package my app for GSoC but packaging was failing.

Path variables were properly set, every required software were installed and most importantly I built and packaged this same app inside the same directory using the same output folder few days back. I forgot that the only change I did was making the app folder a git repository. The output folder also was inside the repository. 
When I changed the output folder in my config file to a folder outside the git repository building and packaging happened successfully.

Always use the process of elimination but before that make sure you have all the facts !


Some other things to check if build is failing
  • Have you installed Ruby and added it to the path variable?
  • Have you added the path to jdk as JAVA_HOME environment variable?

Google Summer of Code 2014



I got selected for Google Summer of Code 2014 this year to contribute to Raxa EMR and I'm thankful to Google and Raxa.

I think if you want to get selected for GSoC what matters is not the number of proposals you submit but the quality. 

My project is to implement a  mobile app that allows users to search for hospitals, doctors, pharmacies and view them on a Google map. And the user can get directions to the location and call if  phone number is available. If the user is a registered user he can view his profile after logging in and he can make appointments with doctors. The user can mark his favorite locations. The app will support language translation. The technology used is Sencha Touch and the app will be able to run on both iOS and Android.

Project wiki can be found here.

Code repository can be found here.


Configuring Kannel WAP/SMS gateway (for HUAWEI E173)

Once you have installed Kannel, then you need to configure it for your device. I used a Huawei E173. And my OS is ubuntu 11.10

Go to /etc/Kannel/Kannel.conf and edit it like follows.

Here is my configuration file.



Here, to find the device in group smsc, I checked, /var/log/syslog. It shows when we plug a device in.

After configuration is done,

sudo bearerbox -v 0 kannel.conf
sudo smsbox -v 0 kannel.conf

If this not the first time and previous processes are still running, you need to kill them first. To do that,
first find the relevant processes by,

ps -ef|grep bearerbox
ps -ef|grep smsbox

Then kill them.

eg:
If the process ID is 914,
sudo kill -9 914

Now once you get bearer box and sms box running, try sending a message

http://localhost:13013/cgi-bin/sendsms?username=kannelUser&password=123&from=+94712345678&to=+94712121212&text=testing





For those who have trouble with measuring time with micro controller !

When doing our digital electronics project I wanted to measure time using the PIC(16F877A)
Here it is explained in simple words

instruction clock cycle = clock cycle/4

The timer input clock(instruction clock) is passed to the prescalar and that is divided by preferred value and fed into timer register.

Say an interrupt occurs when value of timer(counter) becomes 256. Assume clock frequency is 20Mz.

As the timer input clock is instruction clock, we can say an interrupt occurs at the completion of every 256 input clock cycles.

As value fed to timer = instruction clock/prescalar value(say 8), we can say an interrupt occurs at the completion of every 256*8 instruction clock cycles.

As instruction clock = clock/4, an interrupt occurs at the completion of every 256*8*4 clock cycles.

So, the number of interrupts per second = 20Mz / (256*8*4)

INTERRUPTS_PER_SECOND = clock_frequency/(4 * prescalar_value * counter's(timer's) turnover value)

Automated People Counting & fan Controlling System

For our 3rd semester digital electronics module we chose this project.

The purpose of the project was to implement a system which can count the number of occupants in a closed area and control the speed of the fan according to the temperature. The implementation was carried out by three subsystems such as one system for occupant counting, one for temperature measurement and other to control the speed of fans. It was found out that this can be done using  basically IR sensors (Transmitters and Receivers), a temperature sensor and a micro controller. But this implementation was carried out under certain assumptions. Under those assumptions this system works in a reasonably precise manner and serves the purpose and can be used in real world applications which adheres  those assumptions. But this system can be further developed so that it can be used in any situation.

The micro controller we used was 16F877A. The temperature sensor was LM35DZ.   

Here I am not going to explain how the circuits were built. My contribution to the project was mainly programming the micro controller. I preferred PIC C. 

Since we had to do several tasks we had to decide how are we going to use the microcontroller to achieve the expected results. 

Basic algorithm we had in mind was,


Occupants counting algorithm 
  Emitters (Emitter1 and Emitter 2) emit IR signals, which are received by Receiver1 and Receiver 2 respectively. 
  At the time when there is no interrupt the receiver will receive the IR signal.
  When an interrupt is taken place that will be notified by the receiver.
  If the Receiver 1 notices an interruption first and then the Receiver 2 it indicates an entrance to the closed area.
  If the Receiver 2 notices an interruption first and then the Receiver 1 it indicates an exit from the closed area.
  The time delay (T) between the detection of an interrupt by Receiver 1 and Receiver 2(or Receiver 2 and Receiver 1) will determine the time taken to travel between two sensors.
  There is a ceiling value (T1) and a floor value (T2) for this time delay.
  For the accuracy movement is taken as an exit or an entrance only if T1 < T < T2.
  The increment or decrement of the counter is done according to the movement.

It was decided to use the B0 interrupt pin of 16F877A for people counting task.
But the problem was we had two IR beams but one interupt pin. So the solution was, connecting an XOR gate to the inputs from IR sensor circuit and connecting the gate's output to PIN B0, PIN B1 and PIN B2.
By this method we could successfully detect when a person enters or leaves. 

To get the analog input from temperature sensor, PIN A0 was used.

To control the fan(AC), we used phase controlling. 

Below is the source code. Hope to explain the project further.