Archive by Author

Open Source Cell phones for Cuba

My new experiment will consist of implementing google Android OS in regular cell phones for just talk and text. The main purpose of this experiment is to help those in Cuba in need of communication. This is just a rough idea and will give more details later on. Stay tune!

Connecting to MySQL using Java

This tutorial will guide you throught the most fundamental steps in connecting to MySQL using Java. The very first thing you should start with is getting the JDBC driver for MySQL.

  1. Go to the MySQL website and download the Java JDBC driver. Link Download the “JDBC Driver for MySQL (Connector/J)”
  2. Create a new Project in Eclipse or Netbeans or anyother IDE that you might be using for Java.
  3. Add the JDBC driver to the library path in your project properties window
  4. Create or use an existing mysql database, with dummie data.
  5. Download this mysql class. MySQLService.java
  6. Create a simple class that initiate the MySQLService class and do a query.
  7. Here is a guide of how to handle the returning value ResultSet of the doQuery

  8. mysql.connect();
    ResultSet result = mysql.doQuery("SELECT * FROM reports_categories");

    while(result.next())
    {
    System.out.println(result.getObject("category_id").toString()+","
    +result.getObject("category_name").toString());
    }
    result.close();
    mysql.close();

  9. The attached jva file MySQLService.java, the function doQuery only accepts SQL SELECT statements for now. I’ll update this article and the java file with other functions that allows for insertion and update of rows.

I got a new Traxxas Stampede

After no success with the RC heli, I decided to go to RC Cars. I bought my right “pro” RC car, the traxxas stampede. I love this truck, is so a lot of fun. I’m trying to convince my friend to get it so we can race each other, hehe. There is an story behind about all this, (my new rc car). Basically I was inspired buy a project over JBProjects.net (Wifi Robot). It looks so cool what this guy did with his car and some equipment. I like this idea a lot, so I want to do it. I wanted to buy a toy RC car (the one you get a toy r us) but then I decided to go with something more “risky?, fun?, expensive?”. Anyways I ended up buying the stampede for $150 plus charger and battery. In total it was around $250, so far this project is becoming way to expensive. However, one of the main reason I’m doing this project is for learning purposes as well. I think you can’t put a price to learning. So, I my first RC car, and I don’t regret it; this little beast is awesome. Poor thing it doesn;t know, it will be hacked soon. I’ll be posting the status of this Wifi controllable stampede.

Stampede without cover

Playing with Google Web Toolkit

Very cool kit that google has put together. Amazing how you can code in java and achieve ajax type interface and functions and more using GWT. In addition, the client and server communication that offers is inevitable awesome tool to use for server and client data handling. I’m currently playing around with GWT using Eclipse. I’ll make some to time to post a simple tutorial code.

8-bit Up/Down Counter using VHDL

The following code is a 8-bit counter with the following settings:
- asynchronous set (set count to the last digit of student ID;
- syncchronous clear( set count to 0)
- enable (stop counting)


-- Student ID: 123456789

LIBRARY ieee;
USE ieee.std_logic_1164.all;

ENTITY eight_bit_counter IS
PORT(clk, clear, set, enable : IN STD_LOGIC;
count : OUT INTEGER RANGE 0 TO 127);
END eight_bit_counter;

ARCHITECTURE behavior OF eight_bit_counter IS
BEGIN
PROCESS(clk, clear, set, enable)
VARIABLE cnt : INTEGER RANGE 0 TO 127 :=89; – set cnt range to 7 bits and initialize it to 89
VARIABLE direction : INTEGER RANGE -1 TO 1:= -1; – flag to control up/down direction
BEGIN
IF(set = ‘1′) THEN –check the set input
cnt := 89;
direction := -1;
ELSIF(clk’EVENT AND clk =’1′) THEN
IF(clear = ‘1′) THEN — check if the input clear is high
cnt := 0;
direction := 1;
END IF;
IF(enable = ‘1′) THEN – check if it is enable
cnt := cnt + direction;

IF(cnt = 89) THEN — if it reaches 89 begin countdown
direction := -1; — set direction to negative to count backwards
ELSIF(cnt = 67) THEN — if it reaches 67 begin counting up
direction := 1; — set direction to positive to count foward
END IF;
ELSE
cnt := cnt; – if the counter is disable just display the last value and stop counting
END IF; – if the counter is enable resume last counting
END IF;
count <= cnt; – out put the cnt to the count
END PROCESS;
END behavior;

I flew a Cirrus SR20

As a surprise birthday present i got a introduction to flight certificate. I had the opportunity to take-off a plane and manuver it while in the air. We flew around the San Fernando Valley and a little off the border of Simi Valley. Finally, we landed at our home airport, Van Nuys (VNY). It’s was an amazing experience. I want to take more lessons from now on. Thanks babe for such an awesome present.

Cirrus SR20 & Me

Exceed RC - Eagle 50 (not worth it)

I finally ordered the metal rotor head and some links for my eagle 50. I put everything together and now the heli does not want to lift up. It’s a shame; I wasted my money on this product, it just mean a hassle since the beginning. I will be looking for a replacement in the near future.

MySQL, NaviCat & Dreamhhost SSH

Navicat Lite MySQL is a powerful application that let’s you modify mysql databases in both easy and advance way. The manipulation of stored procedures or functions are a ease in this little application. I needed to connect to my dreamhost server, so follow this website with it’ll come handy someday. Check it out.

http://mysql.navicat.com/SSH-Tunnel-for-MySQL-Server-management/SSH.html

Exceed RC - Eagle 50 v2 Helicopter

I wanted to get into the RC world (Helis), so I went ahead and bought this RC Heli model, Eagle 50. I should have read reviews first about this helicopter. It would have save me time and money. First time, I ever own a more complex rc heli, I was really excited. The heli comes assembled, all ready to fly, the only thing you need itsĀ  8 AA bateries for the remote controller. Then when everything was all charged up, I tried flying it in the living room. It was scary how cool it sounded. I got it off the ground for a few inches but it was too dangerous to fly it indoor. So I went to a grass field at my school and try this thing there. The first time I got the heli off the ground, more than 6ft it acted weird, so I pulled the throwle down and boom it did not landed as I wanted. I scratch one of the blade and the main rotor head was damage. I was very dissappointed, then read a bunch of bad reviews about this company. Apperantely, this company likes to sell cheap helicopters, or in other words, waste of mony helis.

In the end, I ordered a aluminum rotor-head and a anti-crash kit. I’ll be posting the result of my next fly.

Camping trip to Death Valley, CA

My friends and I went on a camping trip to Death Valley National Park. This was my second time in that amazing place. There is so much to do and explore. It’s definitely a great gateway for families and friends.

check out my flickr for some good pictures

Lowest Point in the western Hemisphere