IoT - Turn a light on with Java, Raspberry PI and API's

Safely turn on and off 110 V and control 2 Lava Lamps
Free tutorial
Rating: 4.7 out of 5 (156 ratings)
14,827 students
1hr 28min of on-demand video
English [Auto]

Students will be able to create an API that enables a light to be safely turned on and off
Students will learn how to load a Raspberry PI OS from scratch and setup a Java Development envrionment (Eclipse)
Students will learn how to send commands to the PI GPIO Pins to toggle then high and low
Students will learn how to create a simple API to provide simple commands to turn on and off a light
Students will learn how to create a Continuues Integration (CI) Lava Lamp build status indicator of Red and Green


  • Basic understanding of Java programming
  • Access to a Raspberry PI and a few components


Learn about IoT and Java with this Raspberry PI course.

IoT is the next big thing, grow your skills and learn about this technology combined with Java one of the most popular programming languages today.

If this course you will learn how to load a boot SD Card for the Raspberry PI 3 B+ from scratch using the Raspbian OS (Linux) on a 32Gb card, get Eclipse up and running on the PI and work with Java 8. You will understand how to use the basics of one of the most popular Java libraries for the Raspbery PI the Pi4J library.

You will also learn how to develop on other platforms like a Mac and then move the portable class files (Java compiled files) to the PI for a faster more professional development platform.

We wrap up the course by adding formal API's to the project, you will be able to Turn a Light on and off using a RESTful API to control the lights.

It would not be a a great course if you could not do something useful so we integrate an IoT Relay to Safely control 110V AC and show how to turn on and off a Green and Red Lava lamp, this would be perfect for an Automated Build system to provide a Success / Fail indication of the nightly build, exactly what every real development show needs :)

Note: All the source code for the class is available on my GitHub account and also is attached to the last lecture as a resource as a zip file.

Who this course is for:

  • Anyone interested to learn IoT and how Java can be used on a Raspberry PI


Java, Spring Boot, API and React Native Instructor
Tom Jay
  • 4.2 Instructor Rating
  • 1,364 Reviews
  • 53,468 Students
  • 11 Courses

I have over 20 years of Java Enterprise development experience with AWS, Spring Boot, REST API's, Microservices and MongoDB.

I created the back end system at a large bank and created one of the first iOS mobile applications available on the iPhone in 2008.

I've created dozens of of Full Stack End to End solutions from Banking, Social Messaging, Event Discover and Medical device interfaces, Stock Trading, Real Time Bidding Marketplaces and more.

Please enjoy my courses on Java and React Native development.

Top companies trust Udemy

Get your team access to Udemy's top 25,000+ courses