Sunday, January 15, 2017

Getting Started with robo4j-hw-rpi

This blog will provide a step-by-step instruction for how to quickly get started with the robo4j-hw-rpi module. We will use the Adafruit LCD as an example, but any of the supported hardware would be used in pretty much the same way. Also, if you wish support for certain 1 wire protocol sensors, like the Dallas DS18B20 temperature sensors, or the AM2302/DHT11/DHT22 temperature and humidity sensors, you can find a library for them in my private blog (for now).

Installing the Software

First of all the software required must be installed on the Raspberry Pi:
  1. Install PI4J.
    curl -s get.pi4j.com | sudo bash
  2. Set up the Raspberry for i2c communication.
  3. Install the Oracle JDK (if not already installed).
    sudo apt-get install oracle-java8-jdk
  4. Ensure that the Oracle JDK is the one in use (use java –version to verify).
    If not change so that it is. There can be a massive performance difference
  5. Clone the robo4j repo.
    git clone https://github.com/Robo4J/robo4j.git
  6. Run gradlew build in the robo4j root directory.
  7. Install Eclipse (optional, but good if you want to play around with the examples a bit).
    apt-get install eclipse

Setting up Eclipse (Optional)

For an easy way to play around with the examples, we can set up Eclipse on our Raspberry Pi.
  1. Install Egit.
    Inside of Eclipse, go to Help | Install New Software…
    Add a new update site with the following URL:
    http://download.eclipse.org/egit/updates-3.7.1/
  2. Install the Gradle plug-in.
    http://download.eclipse.org/buildship/updates/e42/releases/2.x/
  3. Go to Robo4J on GitHub and clone the repo using Egit from within Eclipse.
  4. Import the projects into Eclipse.
Note that the Eclipse version currently installed by Raspbian will be a rather old version - Eclipse 3.8.0. This unfortunately means that it will not support JDK 8. This does not matter, as the robo4j-hw-rpi and robo4j-math projects only require Java SE 1.7.
Normally you would probably like to develop in a more modern version of Eclipse (or some other IDE) and just use the command line to build robo4j.

Running the Demos

There are two ways of running the demos. One through building the robo4j.jar file with Gradle, and one through Eclipse.
Here is how you would, for example, run the LCD demo using the robo4j.jar built by gradle:
sudo java –classpath robo4j-hw-rpi/build/libs/robo4j-hw-rpi-alpha-0.2.jar:/opt/pi4j/lib/* com.robo4j.hw.rpi.i2c.adafruitlcd.Demo
If you are playing around with the code in Eclipse, do the following:
  1. With Eclipse started, open a command line and change directory to the robo4j/robo4j-hw-rpi/bin folder.
  2. Search for the demo/example corresponding to the hardware set up you want to test in the examples folder in the eclipse project.
    For example, if you have an Adafruit LCD shield, you would use the com.robo4j.hw.rpi.i2c.adafruitlcd.Demo class.
  3. Run the demo from the command line.
    Do not forget to add the PI4J classes to the classpath, for example:
    sudo java –classpath .:/opt/pi4j/lib/* com.robo4j.hw.rpi.i2c.adafruitlcd.Demo
Running the LCD shield demo would show you something similar to this:

Have fun!

62 comments:

  1. Really very informative blog..Keep in blogging regularly to update these kinds of informatives.. Wish to learn Java, enroll you in Java Training in Velachery to learn more....

    ReplyDelete
  2. Such an informational blog, your blog will provide step-by-step instructions for how to quickly get started with the robo4j-hw-rpi module. We have wide range of wireless humidity sensors and wireless temperature sensors which are used 1 wire protocol.

    ReplyDelete

  3. Kavita Sharma VIP female calls girls Escort service without condom French full Sexx yearly Sexx sucking and screwing in delight service independent escort service private girls 100% safe and secure 24 hours available!!!!!
    Surat Escorts
    Call Girls in Surat

    ReplyDelete
  4. Are you looking for a young and hot Escort near you then contact me as soon as possible.
    Escorts Service
    Call Girls

    ReplyDelete
  5. This is Riya a young and hot Gurgaon Escort. I am 24 hours available to make your day wonderful and enjoyable. You will enjoy a lot with me.
    Gurgaon Call Girl
    Gurgaon Escorts
    Delhi Escorts

    ReplyDelete
  6. This is Soniya a young and hot Escort in Gurgaon. I am always ready to give you all types of fun and enjoyment at any places.
    Escorts Service in Gurgaon
    Call Girls in Gurgaon
    Escorts in Huda City Center
    Aerocity Escorts
    Mahipalpur Escorts

    ReplyDelete
  7. I always treat my customers well and naturally, without haste and in a delicious way. I'm what you're looking for in a woman, a mix of silage, madness and pleasure. I'll make you super at ease and you'll have a delicious orgasm with your legs trembling.
    Delhi Escorts
    Delhi Call Girls
    Escorts in Saket
    Gurgaon Call Girls
    Mumbai Escorts
    Call Girl in Jaipur
    Mumbai Call Girls

    ReplyDelete
  8. You will see that I am very passionate and that I give myself completely to leave you very satisfied. My services are super tasty with a lot of skill and a lot of sensuality making your fire alight.
    Escorts in Gurgaon
    Kolkata Escorts
    Escorts in Jaipur
    Hyderabad Escorts
    Bangalore Escorts
    Escorts in Goa

    ReplyDelete
  9. You are looking at a highly seductive lover who knows how to please a man. I will put a smile on your face in no time. I'm going to show you all my skills, and we're going to get along very well between four walls.

    https://priyaescortt.minnie88.com/mumbai-escorts-gallery.html

    ReplyDelete
  10. I'm here to satisfy your wishes, and my main goal is to give a lot of pleasure to the client. I'll take care of you the way you deserve it and I'll give you the best deal and the hottest sex you'll ever try.

    Mumbai Escort
    Jaipur Escort
    Delhi Escort
    Gurgaon Escort
    Gurgaon Escort
    Delhi Escort
    Bangalore Escort
    Hyderabad Escort
    Kolkata Escort

    ReplyDelete
  11. My service is very tasty, with a lot of will and without any hesitation, I guarantee that you will not regret it. I am super sensual and I will involve you from start to finish in our meeting.
    Delhi Escort Girl
    Delhi Call Girl

    ReplyDelete
  12. Hey sweetie, my name is Sneha and I'm a newly independent 24-year-old call girl. With me, you will have a pleasant time, full of passion and a lot of satisfaction that will always be etched in your memory.
    Escorts Service
    Escorts Service

    ReplyDelete
  13. You will spend an unforgettable encounter full of lust and sensuality, you will see that I am full of pleasure and seduction. I'm crazy to be your naughty little girlfriend so don't wait long to come and see me.

    Escorts Service
    Delhi Escorts Service
    Mumbai Escorts Service
    Gurgaon Escorts Service
    Bangalore Escorts Service
    Jaipur Escorts Service
    Hyderabad Escorts Service
    Thane Escorts Service

    ReplyDelete
  14. I love a naughty and neat sex session, as I'm going to make you forget about the world while you're with me. I will be waiting for you eager to meet you and give you the best sexual adventure of your life.
    Escorts Service
    Call Girls

    ReplyDelete
  15. Have you ever heard that an escort organization is allowing its girls and ladies to go to the client's home whenever they call? No, right. But at the Bangalore escort, even this service is also possible. There are times when clients feel tired to even walk to the escort and have fun. That's why the Bangalore escort agency has started this service. In this service whenever you call your favorite girl in Bangalore to your home, flat, restaurants, hotels, bars or pubs, they will come properly dressed up as you desire to have fun with you. And there you can do anything with them.

    This is another reason why the escort in Bangalore is famous. They want their client satisfaction and for that, they can do anything. The girls will be sent to your place by your desired time and then it's your responsibility of sending them back to the agency. You can have full fun sex, intercourse, and various other sexual moments with the girls. By the time they are with you, they are solely your property and the escort agency can't tell anything to you regarding the girls



    bangalore escort 
     bangalore call girls 
    bangalore russian escorts 
    bangalore cheap escorts 
    bangalore escorts 


    bangalore escorts 

    ReplyDelete
  16. We provide sexual with full safety and security to have intimacy. Our Nanital Sexy Call Girls is fully trained to create an enjoyable environment to make the mood of their full of romance. Fans after the erotic talks create the world's precious feeling that you been ever realized.

    ReplyDelete
  17. Come and enjoy the best sexual experience of your life with me, I will totally satisfy you. I'm willing to give you all the pleasure and attention you deserve, in bed I love fiery sex.
    Call Girls in Mumbai
    Mumbai Call Girls

    ReplyDelete
  18. I am experienced in the art of seduction and I am sure you will be fully satisfied by my side. Beside me, you will have that sex that makes you forget everything for a while.

    Call Girls in Delhi
    Delhi Call Girls

    ReplyDelete
  19. I love having hot sex and I will behave just the way you want and you'll get lost in my infectious curves.
    Escorts Service
    Call Girls

    ReplyDelete
  20. You will get full enjoyment of Sarakaur.com. Search Delhi Escorts and you can find a good partner by going to sarakaur.com. Delhi Escorts is providing you the cheapest service. The subhadha you will find in Delhi Escorts will not be found anywhere else. Search for this sarakaur.com and book a good companion to spend some time.

    Delhi Escorts Service | Escorts Service in Delhi

    ReplyDelete
  21. iam priyatakur bangalore living iam happy to serve my service to all my customers i know how to satisfy them
    do you need my bangalore escorts service contact here
    Bangalore escorts agency *****
    Russian escorts Bangalore *****
    Bangalore escorts ****
    Bangalore escorts

    ReplyDelete
  22. assignment help in Malaysia can assist students in writing top-notch quality content within the shortest period of time to get impressive marks. Our assignment help experts know how to curate content with relevant information and the right tone. Since we understand the fact that writing a good quality assignment is incredibly important for students in Malaysia, we assign the most experienced and skilled professionals in the business to write and read the assignments that we provide to students. Besides that, it is our motive to deliver the assistance at a reasonable cost!

    ReplyDelete
  23. fatehgarh-sahib may be a locale of Punjab found inside the western parts of the state. Interior it stays one of the various tube stations around the extend of fazilka-escorts. This infers that getting to more specific places inside the locale is made outstandingly basic by this plentiful choice of transport joins. firozpur-escorts can be an magnificent run to visit for all sorts of different reasons, and the locale consolidates a one-of-a-kind discuss that has be that as it may to be effectively copied by any other locale inside gurdaspur-escorts the city.

    ReplyDelete
  24. Sexy Call girls always avilable 24*7
    When you find the opportunity to meet up with our beautiful escorts, your life will probably differ for eternity. We have numerous options such as school-girls, housewife,IT call girls out of Mumbai, celebrity Escorts sexiest youthful ladies, Top Most Escorts Mumbai working experts, and also even more. For why Ankita Escort service bureau would be the finest in Mumbai? Best Escorts Service Agency together with This Escorts will be headquartered in Mumbai. The best escorts in Mumbai offer support.We have the off ice of Backrub and Gender along side the most useful girls.
    https://mareenaescortinmumbai.com/escorts-in-mumbai.html

    ReplyDelete
  25. She can make you calm and crazy anytime whenever you wish! Call her anytime and she will be ready to offer you unconditional love, care, and pleasure which people can’t forget! Make yourself relaxed if you are hanging right now! Escort service or call girl service
    Bangalore escorts ****
    Bangalore escorts agency *****
    Russian escorts Bangalore *****
    KR Puram escorts *********
    majestic escorts ****
    Bellandur Escorts ****
    jp nagar escorts ****
    yeshwantpur escorts ***

    ReplyDelete
  26. Economics is a very popular field, but to earn a a lucrative job, mere degree is not enough; you need to have scored well throughout your academic years. As a student of Economics you certainly have to handle and complete multiple tasks at the same time and that too efficiently. One big task is that of an assignment and it can be so much stress to complete it on time all the while adhering to the instructions of professor. Get in touch with the experts of Help in Homework and receive customized and affordable Economics Assignment Help and be one of the top scorers of your class. Our expert will complete your assignment on time and ensure that it is free from plagiarism and accurate.

    ReplyDelete
  27. Port forwarding is a way of making your router use a specific port to communicate with certain devices. By setting a specific port for your devices, you are telling your router to always accept requests for those ports and forward data to a device’s private IP address. In order to understand tp link port forwarding, it helps to understand a little about how routers work first.

    ReplyDelete
  28. Hello all,
    I've launched a new adult website and hundred of categories.
    Those who have interested to watch in good quality please go and watch some amazing videos. Below I'm mentioning website:
    FreePornVideos

    ReplyDelete
  29. So much happy to read this blog post, you have many information put together on this article and i really appreciate your effort in sharing it. cau post utme past questions

    ReplyDelete
  30. Custom Packaging Boxes with LOGO!We pay attention to every detail and work hard to offer the high quality you expect. We have the experience, the equipment, and just about all the services you’d expect from an old-fashioned printer. But with PackagingPapa, all of this is available online, at your convenience. Wholesale Boxes With Logo

    ReplyDelete
  31. Like every good thing , Disney Plus has certain issues. For instance, a lot of members have voiced their displeasure about the warning users to go to disneyplus.com/begin and
    disneyplus.com login/begin in order to type in an 8-digit number.

    ReplyDelete
  32. Office Home and Student 2021 is designed for students and families who choose to use classic Office software such as Excel, Word, and PowerPoint on Windows and Mac. It’s a one-time purchase that can be used at home or in the classroom on one PC or Mac.
    office.com/setup home and student 2021
    office.com/setup home and business 2021

    ReplyDelete
  33. https://medium.com/@hulucomhulu_21681/https-www-cloudflare-com-5xx-error-landing-7715d7260a6f

    ReplyDelete

  34. Heyy!!
    Are you looking for some good high quality celeb porn video, we have hundreds of videos with different categories. Click on the link to enjoy the best videos.
    nudeweb

    ReplyDelete
  35. How Many People Can Be On A Mortgage - It's very common for more than one person to be on a mortgage. The question is, how many people can you include on your mortgage? The answer is typically three or four. But there are certain circumstances where more than one person can be included on the same loan. For example, a lender may not allow you to put more than two people on the mortgage, or only two people can be on the loan. How Many People Can Be On A Mortgage

    ReplyDelete
  36. If you're wondering How To Get Rid Of Earwig In Your House, you've come to the right place. This article will give you the information you need to get rid of earwigs. The first step is to seal up your house's cracks and holes. Try to find areas where water leaks from your pipes or hot spots. If you can't find any, try to use a dehumidifier or apply a liquid pesticide to those areas. If those methods aren't working, you can always use natural scents.
    How To Get Rid Of Earwigs In Your House

    ReplyDelete
  37. What Causes Flying Ants in Your House - The warm weather can also attract flying ants. These insects are attracted to foods that are sweet. Additionally, they can be attracted to damp areas and wood. Therefore, you should look for signs of damp wood around the house. It's a good idea to hire a pest control professional to get rid of the ants in your home. These pests are difficult to eradicate, but they can be controlled. What Causes Flying Ants in Your House

    ReplyDelete
  38. What Does It Mean to Refinance a House - The process of refinancing a house is a great way to get more money out of your home. In fact, about 50% of homeowners refinance their houses to remove excess cash and reinvest it in another property or send it to college. Other homeowners refinance to change the term of their mortgage, ranging from 30 years to 15 years. This move helps you make your budget work better, and you can pay off your loan quicker. What Does It Mean to Refinance a House

    ReplyDelete
  39. What Is the Cheapest Type of House to Build - There are many different types of homes you can build, but there are a few common choices when it comes to the cheapest house to build. A simple square or rectangular home is usually the most affordable. These are also the easiest to construct, since they do not require elaborate angles or bump-outs. While you can also add landscaping to give your house a more attractive look, this type of construction is expensive.What Is the Cheapest Type of House to Build

    ReplyDelete
  40. Heyy!!
    Are you looking for some good high quality celeb porn video, we have hundreds of videos with different categories. Click on the link to enjoy the best videos.
    madison lecroy nude

    ReplyDelete
  41. Heyy!!
    Are you looking for some good high quality celeb porn video, we have hundreds of videos with different categories. Click on the link to enjoy the best videos.
    LeakedMMS

    ReplyDelete
  42. From ij.start.canon, you can download the printer driver for your Canon printer that will further work on enhancing your experience. To know more about it, you must look at the given information.
    From ij.start.cannon, you can download the printer driver for your Canon printer that will further work on enhancing your experience. To know more about it, you must look at the given information.

    ReplyDelete
  43. Hey friend, it is very well written article, thank you for the valuable and useful information you provide in this post. Keep up the good work! FYI, shih tzu hair products , slice credit card review, The alchemist Pdf Download
    ,Junk Food vs Healthy Food Essay

    ReplyDelete
  44. Hi, I'm Megha Malik! here to give sensual pleasure to my clients for which many people are still standing in queue. Make your night lusty with her at your place. I am the kind of dynamic girl who can put a huge smile on your personality. I generally prefer gentlemen who understand it honor their female companions. I have an apartment, so let’s go and enjoy.
    Female companions in Delhi

    ReplyDelete
  45. Hey, what a brilliant post I have come across and believed me I have been searching out for this similar kind of post for the past week and hardly came across this. Thank you very much and will look for more postings from you.
    CBD Packaging
    Cookie Boxes wholesale UK
    custom lip balm packaging boxes
    Vape Cartridge Packaging UK
    Custom macaron packaging boxes uk
    printed eye shadow Boxes
    wholesale candle packaging boxes
    custom printed boxes no minimum uk
    Custom printed soap boxes
    custom chip cones

    ReplyDelete
  46. https://www.theguidezilla.com/my-sdmc-sso-login/
    MySDMC SSO has linked to your computer sign-in on a district device and will sign you in immediately. Go to mysdmc.manateeschools.net on a personal device and input your login information.
    my-sdmc-sso-login/a>

    ReplyDelete
  47. Cleansers come in various formulations to cater to different skin types and concerns. Women can select cleansers tailored to their specific needs, whether they have oily, dry, sensitive, or combination skin.

    Wellness and Self-Care: Cleansing the face is often seen as a foundational step in self-care and wellness routines. Women trust cleansers as part of their daily self-care rituals to promote relaxation and overall well-being. Dark spot set

    ReplyDelete
  48. thank you
    if you guys interested in coupons code then follow the link runewood coupons code

    ReplyDelete
  49. If you're seeking information on body to body spa in bangalore that meet your specific preferences or requirements It is crucial to communicate your demands clearly to a certified massage professional or spa.

    ReplyDelete
  50. body to body massage in bangalore is more intimate than regular massage, which is why it's important to approach the massage with care and focus on your safety and well-being.

    ReplyDelete
  51. we provide all kinds of services for you in our female to male massage in hyderabad, so you can take many type of spa services from our hot massage girl therapists

    ReplyDelete