SlideShare a Scribd company logo
RASPBERRY PI CAR
BOGDAN CRACIUN
SIVECO ROMANIA
Build, Code, Deploy and Run
Agenda
 Introduction
 Requirements
 Hardware platform
 Software platform & Application code
 Q&A
 Running Mode Demo
About me
 Software Architect @ SIVECO Romania from 2003
 Oracle Certified Master, Java EE Enterprise Architect
 Founding member of Oracle Architects Club – Romania chapter
Requirements
 Wireless control - no wires
 Wi-Fi based
 Smartphone and Car only setup
 No external Wi-Fi access point needed
 No additional administration system
 Automatic startup of services on power on
 Queue base control
 Automatic impact detection and reaction
 Front lights control
 Status lights for Impact Mode and Commands
Main actor
Secondary roles
Prop
Victim
Result
v1 v2
Running environment
Development environment
Operating system setup
 Operating system
 Rasbian “Wheezy” – Debian based Raspberry Pi distribution
 Access point
 Hostapd
 EW-7811Un with custom drivers to support AP mode
 DNS & DHCP
 Dnsmasq
 Remove serial console support from standard Raspbian distribution
Service integration
 Java Application
 Java Service Wrapper
 Node Application
 Nodejitsu Forever
 Linux native program
 Scripting
JeeNode integration
 Using serial communication
 RXTX Java library with native support
Car engine
 Java SE Application
 Spring Framework
 IoC container
 Spring Integration
 Redis Channel Adapter
 Custom Serial Channel Adapter
 Using RXTX Serial library
Control component - Client
 Client
 JQuery Mobile
 User interface and
interactions
 Socket.io
 Client <> Server
communication
 Virtualjoystick.js
 Dual virtual joystick
support
Control component - Server
 Server
 Node.js Server
 Server components (request
handlers and queue
management)
 Redis Server
 Node <> Java integration
using Redis Pub/Sub
 Queue persistence using
Redis sorted sets
Image streaming
 mjpg-streamer
 With Raspberry Pi Camera support – 11 fps @ 640x480
Software challenges
 No AP mode support in EW-7811Un
 Action: Custom hostapd compatible RTL8188CUS was installed
 Reading HC-SR04 sensor data using Java
 Works fine if it is the only process on Raspberry Pi
 Bad choice to use the sensor with a non real-time SO
 Action: Added a Jeenode (Arduino Uno clone) to run the reading
loop and push data to a serial Raspberry Pi port
Software challenges – cont.
 Compiling the following on Raspberry Pi:
 redis server
 node.js
 RXTX native library
 mjpg-streamer – custom module to support image streaming
 Image streaming speed optimization
Hardware challenges
 Differences between Raspberry Pi and HC-SR04
Ultrasonic Sensor - 3.3v vs 5v
 Action: Used a basic voltage divider between the
Echo port and the GPIO pin of the Raspberry Pi
 Reuse the dual H-bridge from the toy car PCB
(Printed Circuit Board) or integrate the L298N board
 v1 reuse car PCB
 v2 is connected to motors using L298N board
High level Architecture
Detailed Diagram
Detailed Diagram
Lessons learned
 Automate as much as possible
 Build automation
 Test automation
 Use mocks for development and testing
 Development without the real car
 Design a component based system for easy refactoring
 Switch between implementations easy
 Prototype before develop
 It is harder to change something already developed and fully
integrated
 Switch log levels to error/fatal/off
 Use versioning and release management for code and hardware
designs
 Don’t use / break children toys !
Final thoughts
 Be a problem solver, not just a programmer.
 Use the best tool for the job
 Does the language really matter?
 Keep your mind open.
Testing Team
Next projects
 Raspberry Pi assisted
quad-copter
 Raspberry Pi controlled
Tank
Q&A
 Demo car connection data:
 SID: orange
 Password: 12345678

More Related Content

Similar to Raspberry Pi Car with Java

_SOMANATH_
_SOMANATH__SOMANATH_
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
Shubhra Kar
 
Labview1_ Computer Applications in Control_ACRRL
Labview1_ Computer Applications in Control_ACRRLLabview1_ Computer Applications in Control_ACRRL
Labview1_ Computer Applications in Control_ACRRL
Mohammad Sabouri
 
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Intel® Software
 
API Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsAPI Virtualization: Mocking on Steroids
API Virtualization: Mocking on Steroids
SmartBear
 
Snug2007 Presentation
Snug2007 PresentationSnug2007 Presentation
Snug2007 Presentation
clkalyan
 
Surekha_haoop_exp
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_exp
surekhakadi
 
Provisioning the IoT
Provisioning the IoTProvisioning the IoT
Provisioning the IoT
Sander Mak (@Sander_Mak)
 
REMOTE TRIGGERED SOFTWARE DEFINED RADIO
REMOTE TRIGGERED SOFTWARE DEFINED RADIOREMOTE TRIGGERED SOFTWARE DEFINED RADIO
REMOTE TRIGGERED SOFTWARE DEFINED RADIO
Kunal Bidkar
 
Azure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNETAzure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNET
Lorenzo Barbieri
 
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
mfrancis
 
Android Tools for Qualcomm Snapdragon Processors
Android Tools for Qualcomm Snapdragon Processors Android Tools for Qualcomm Snapdragon Processors
Android Tools for Qualcomm Snapdragon Processors
Qualcomm Developer Network
 
Aleksandar_Popadic_CV
Aleksandar_Popadic_CVAleksandar_Popadic_CV
Aleksandar_Popadic_CV
Aleksandar Popadic
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Mark West
 
Virtual Platforms
Virtual PlatformsVirtual Platforms
Virtual Platforms
clkalyan
 
Real Time Network Monitoring System
Real  Time  Network  Monitoring  SystemReal  Time  Network  Monitoring  System
Real Time Network Monitoring System
Girish Naik
 
Resume
ResumeResume
Resume
pramod yadav
 
Prabhat Ravi Resume
Prabhat Ravi ResumePrabhat Ravi Resume
Prabhat Ravi Resume
Prabhat Kumar Ravi
 
How to double .net code value
How to double .net code valueHow to double .net code value
How to double .net code value
javOnet
 

Similar to Raspberry Pi Car with Java (20)

_SOMANATH_
_SOMANATH__SOMANATH_
_SOMANATH_
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Labview1_ Computer Applications in Control_ACRRL
Labview1_ Computer Applications in Control_ACRRLLabview1_ Computer Applications in Control_ACRRL
Labview1_ Computer Applications in Control_ACRRL
 
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...
 
API Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsAPI Virtualization: Mocking on Steroids
API Virtualization: Mocking on Steroids
 
Snug2007 Presentation
Snug2007 PresentationSnug2007 Presentation
Snug2007 Presentation
 
Surekha_haoop_exp
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_exp
 
Provisioning the IoT
Provisioning the IoTProvisioning the IoT
Provisioning the IoT
 
REMOTE TRIGGERED SOFTWARE DEFINED RADIO
REMOTE TRIGGERED SOFTWARE DEFINED RADIOREMOTE TRIGGERED SOFTWARE DEFINED RADIO
REMOTE TRIGGERED SOFTWARE DEFINED RADIO
 
Azure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNETAzure Cloud Application Development Workshop - UGIdotNET
Azure Cloud Application Development Workshop - UGIdotNET
 
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
 
Android Tools for Qualcomm Snapdragon Processors
Android Tools for Qualcomm Snapdragon Processors Android Tools for Qualcomm Snapdragon Processors
Android Tools for Qualcomm Snapdragon Processors
 
Aleksandar_Popadic_CV
Aleksandar_Popadic_CVAleksandar_Popadic_CV
Aleksandar_Popadic_CV
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
 
Virtual Platforms
Virtual PlatformsVirtual Platforms
Virtual Platforms
 
Real Time Network Monitoring System
Real  Time  Network  Monitoring  SystemReal  Time  Network  Monitoring  System
Real Time Network Monitoring System
 
Resume
ResumeResume
Resume
 
Prabhat Ravi Resume
Prabhat Ravi ResumePrabhat Ravi Resume
Prabhat Ravi Resume
 
How to double .net code value
How to double .net code valueHow to double .net code value
How to double .net code value
 

Recently uploaded

Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 

Recently uploaded (20)

Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 

Raspberry Pi Car with Java

  • 1. RASPBERRY PI CAR BOGDAN CRACIUN SIVECO ROMANIA Build, Code, Deploy and Run
  • 2. Agenda  Introduction  Requirements  Hardware platform  Software platform & Application code  Q&A  Running Mode Demo
  • 3. About me  Software Architect @ SIVECO Romania from 2003  Oracle Certified Master, Java EE Enterprise Architect  Founding member of Oracle Architects Club – Romania chapter
  • 4. Requirements  Wireless control - no wires  Wi-Fi based  Smartphone and Car only setup  No external Wi-Fi access point needed  No additional administration system  Automatic startup of services on power on  Queue base control  Automatic impact detection and reaction  Front lights control  Status lights for Impact Mode and Commands
  • 12. Operating system setup  Operating system  Rasbian “Wheezy” – Debian based Raspberry Pi distribution  Access point  Hostapd  EW-7811Un with custom drivers to support AP mode  DNS & DHCP  Dnsmasq  Remove serial console support from standard Raspbian distribution
  • 13. Service integration  Java Application  Java Service Wrapper  Node Application  Nodejitsu Forever  Linux native program  Scripting
  • 14. JeeNode integration  Using serial communication  RXTX Java library with native support
  • 15. Car engine  Java SE Application  Spring Framework  IoC container  Spring Integration  Redis Channel Adapter  Custom Serial Channel Adapter  Using RXTX Serial library
  • 16. Control component - Client  Client  JQuery Mobile  User interface and interactions  Socket.io  Client <> Server communication  Virtualjoystick.js  Dual virtual joystick support
  • 17. Control component - Server  Server  Node.js Server  Server components (request handlers and queue management)  Redis Server  Node <> Java integration using Redis Pub/Sub  Queue persistence using Redis sorted sets
  • 18. Image streaming  mjpg-streamer  With Raspberry Pi Camera support – 11 fps @ 640x480
  • 19. Software challenges  No AP mode support in EW-7811Un  Action: Custom hostapd compatible RTL8188CUS was installed  Reading HC-SR04 sensor data using Java  Works fine if it is the only process on Raspberry Pi  Bad choice to use the sensor with a non real-time SO  Action: Added a Jeenode (Arduino Uno clone) to run the reading loop and push data to a serial Raspberry Pi port
  • 20. Software challenges – cont.  Compiling the following on Raspberry Pi:  redis server  node.js  RXTX native library  mjpg-streamer – custom module to support image streaming  Image streaming speed optimization
  • 21. Hardware challenges  Differences between Raspberry Pi and HC-SR04 Ultrasonic Sensor - 3.3v vs 5v  Action: Used a basic voltage divider between the Echo port and the GPIO pin of the Raspberry Pi  Reuse the dual H-bridge from the toy car PCB (Printed Circuit Board) or integrate the L298N board  v1 reuse car PCB  v2 is connected to motors using L298N board
  • 25. Lessons learned  Automate as much as possible  Build automation  Test automation  Use mocks for development and testing  Development without the real car  Design a component based system for easy refactoring  Switch between implementations easy  Prototype before develop  It is harder to change something already developed and fully integrated  Switch log levels to error/fatal/off  Use versioning and release management for code and hardware designs  Don’t use / break children toys !
  • 26. Final thoughts  Be a problem solver, not just a programmer.  Use the best tool for the job  Does the language really matter?  Keep your mind open.
  • 28. Next projects  Raspberry Pi assisted quad-copter  Raspberry Pi controlled Tank
  • 29. Q&A  Demo car connection data:  SID: orange  Password: 12345678