Introduction: Request Uber Rides With an Arduino Button
Hi,
If you use uber alot like me so this instructable will make your life better.I have only three pickup locations: home , work and the local fablab address :D .
That's why i made this button. I have one at home and another at work ,before leaving i press the button and wait for the driver to arrive.
Step 1: Tools and Components
Electronic components :
- Arduino Mega 2560
- 1Sheeld
- Big rounded push button
- 2x seven segment
- Lcd 2x16
- Usb cable
- Pcb (i like the through hole type).
- 15x 330 ohm resistors
- small breadboard (for testing purpose)
- wires and jumpers
Materials :
- 3mm plywood
Tools :
- Soldering iron
- Solder paste
- Solder
- wire stripper
- pcb third-hand holder
- double tape
vernier caliper
Step 2: Uber Box
If you use normal sized lcd 2x16 (70x25 mm), small seven segments (12.5x19mm each) and Big button with 30mm width then you can download the file at the end of this step and go ahead.
If not then grab your vernier caliper and follow me :D
Measure your components and by using the default program for your laser cutting machine adjust the width of each hole as shown in figures.
Note: Be aware of what you are measuring.
Assemble the box where lcd is in the front side and the button in top one.
Congrats,
you made the box.
Oh and here is the file ... :D :D
Attachments
Step 3: Lcd Hello World!!
Even if you are expert at electronics it's better to make your circuit step by step.
Connect the lcd as shown in figure and test using the code below.
Attachments
Step 4: Seven Segment Are You Working ??
Test the seven segments as the previous step but this time use breadboard first
Connections:
- a > 22,23
- b > 24,25
- c > 26,27
- d > 28,29
- e > 30,31
- f > 32,33
- g > 34,35
Note that each segment needs to be connected with 330ohm resistor before connected to arduino.
Also you need to know the diffrence between common anode and common cathode WELL.
here is the code..
Attachments
Step 5: Make the Creby Monster
Make a pcb with the seven segments circuit.
You can use the same pcb to collect all the grounds of the project in one single node.
Step 6: Connect the Button to Pin 12
Simply, connect the button to pin 12. :)
Step 7: Uber Api
Uber community made test service for it's api called sandbox.
In order to make any request to uber servers you must have an application on uber developers. Get access token.
I used a firefox addon called RESTClient .
.
.
Add these to the headers.
Authorization
Bearer OAUTH2-KEY
Content-Type
application/json
.
to get produnct_id
- GET
https://sandbox-api.uber.com/v1/products
{"start_latitude":"YOUR_LAT","start_longitude":"YOUR_LONG"}
the request cycle is as follows:
- POST
https://sandbox-api.uber.com/v1/requests
{"start_latitude":"YOUR_LAT","start_longitude":"YOUR_LONG","product_id":"PRODUCT_ID"}
PUT
https://sandbox-api.uber.com/v1/sandbox/requests/REQUEST_ID_FROM_PREVIOUS_REQUEST _RESPONSE
{"status": "accepted"}
GET
Here is the code for arduino.
Note: you'r the only one responsible for any requests made to the main api.
Step 8: Assemble !!!!
While assembly make sure that all wires are safe and double check every connection before closing the box.
Congrats!!!
14 Comments
Question 5 years ago on Step 7
These links appear to be broken. Did Uber change their API? I would like to replicate your project.
7 years ago
This would be a great concept for a bar if there was a way to log in.
Reply 7 years ago
It's a new uber project.
Thanks;
7 years ago
Hey Mostafa..
Cool work.. Keep it up..
Salam .. ☺
Reply 7 years ago
Shokran.. :D
7 years ago
OMG! Do you realize that you just made a functioning fast travel box. Next step is to integrate into a model pip boy!
Reply 7 years ago
Thanks,
It's a great idea. I'll try it out.
7 years ago
Hahaha this is such a cool idea! Thanks of sharing! Makes Uber that much easier!
Reply 7 years ago
Thank you
7 years ago
This is really cool, of if can make a suggestion. I recommend you out a confirmation print in case you accidentally press the button and an uber comes without you knowing.
Reply 7 years ago
Thanks,
Do you have any suggestions on how to make it ?!! Like pressing twice or adding another button .
7 years ago
Oh wonderful Mustafa, I hope that I will also do it
Reply 7 years ago
Thank you
You can have one if you want ;)
7 years ago
*confirmation promt