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

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.

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..

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

the request cycle is as follows:

  1. POST

    https://sandbox-api.uber.com/v1/requests

    {"start_latitude":"YOUR_LAT","start_longitude":"YOUR_LONG","product_id":"PRODUCT_ID"}

  2. PUT

    https://sandbox-api.uber.com/v1/sandbox/requests/REQUEST_ID_FROM_PREVIOUS_REQUEST _RESPONSE

    {"status": "accepted"}

  3. GET

    https://sandbox-api.uber.com/v1/requests/SAME_REQUEST_ID

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!!!