Home » Archive by category "Java" (Page 6)

Sensor HMC5883L

Finally found some time to finalize my developments for the HMC5883L sensor.  At first it looked like an easy mission but I encountered some issues during development and testing.  Trying to follow litterally the operational example gave me problems getting the right values.  Finally after some trial and error I found out the way to go.  The datasheet is not written for software developers.  But that is a remark I can make for all datasheets I encountered.  But anyway it gives a great feeling once you reach that breakthrough and get the right readings.  You can find the most important information at HMC5883L.  I found the information about calculating the heading at Calculating Heading.

When you look at the sensor you see an X and Y axis.  The angle calculated is the angle between the geographic north and the X axis shown on the sensor.  Well at least it is how I interprete it with the received readings.  I did not go into detail on the Z axis readings.

Jan

Continue reading »

Rasberry Pi Controlled Car

I still have some sensors from Adafruit I have to work on but I keep on thinking on my goal I mentioned in one of my posts.  I want to make a remote controlled (rc) car driving by Raspberry Pi and PI4J.  So finally I took my courage together and searched for that piece of hardware (car chassis) that will change my life.  I bought a car chassis (see picture) and controller to control the wheels on the car.  Bought 2 controllers just in case I would have the crazy idea to set up a 4 wheel  control on the car.  Not that I am putting pressure on myself. The componens come out of China, so it takes a while before they will be here in Belgium.  When looking for the components it surprised me that those pieces cost a lot less than in other parts of the world and even more crazy the fact that there are no shipping costs.  Found a site where the transport costs were higher than the hardware itself.  Amazing.  Disadvantage is the fact that it will take a while before they will arrive.  I have time but really looking forward to start developing, solding and putting everything together.

To be continued …

New 4WD Robot Smart Car Kits Chassis w/ Mobile Platform 4 Wheels Dual H Bridge DC Stepper Motor Drive Controller Board Module Arduino L298N HG

Jan

Continue reading »

Developments TCS34725 finished

I created a new release 1.2 and pushed to Github.  I finished the development and troubleshooting for the use of TCS34725.  After posting my findings on the Adafruit Forum I understood that my readings in my application were correct.  A little python script proved this because the results there were the same.  As a conclusion I can say that I am kinda disappointed in the sensor.  The sensor is apparently very sensitive for surrounding light which impacts the readings.  I just thought that I could put an object of some color on the sensor and get rgb values who were close to the actual color of that object but it is not that easy.  Read the forum for more information.  I have finalized the development.  Feel free to comment.

As with the other sensor, I used PI4J, IntelliJ and Java 1.7 of course.  The application is running on Raspbery Pi B+.

 

Jan

Continue reading »

Sensor TCS34725

Currently working with the Sensor TCS34725 (Color light-to-digital converter with ir filter.  Promising when you look at the description of the sensor.  But already when doing early tests I did not get the right rgb readings.  I also used a simple Python program to get the RGB readings but also there the output is similar.  Like with the other development I did earlier in this blog, I also use PI4J.  Now I am checking my source code and verify with the datasheet for the sensor to find out if I am missing something but since the Python program has similar results I have some doubts I do something wrong.  In the meanwhile I also had contact with Adafruit support around this issue but my questions are still unanswered although I got reaction from them.  See thread on  https://forums.adafruit.com/viewtopic.php?f=8&t=67795  Feel free to make comments too if you have any ideas.  I am open for them.  I hope I can get the sensor give me the results I expect or have an explanation why I have not.  Shoot if you have an idea.

See TCS34725 for more information on the sensor.

Jan

Continue reading »