Project tutorial
ABPC - Automatic Bing Point Collector

ABPC - Automatic Bing Point Collector © GPL3+

Microsoft rewards, here we come!

  • 40 views
  • 0 comments
  • 3 respects

Components and supplies

A000057 featured
Arduino Leonardo
Any board that can emulate a Keyboard will work
×1
09590 01
LED (generic)
You don' t need one if your board has a built in LED.
×1
4415447 jg5sklyzsj
Resistor 220 ohm
You don' t need one if your board has a built in LED.
×1
11026 02
Jumper wires (generic)
You don' t need one if your board has a built in LED.
×1
12002 04
Breadboard (generic)
You don' t need one if your board has a built in LED.
×1
Knowledge on operating your computer and the Arduino IDE
×1

Necessary tools and machines

Yourself
Computer with Arduino IDE

Apps and online services

Ide web
Arduino IDE
Fritzing
Only needed if you intend to view the .fzz files

About this project

So I recently signed up for Microsoft Rewards. Microsoft Rewards is a program that promotes the use of Microsoft products and services. Once you have enough points, you can use the points you earned to enter sweepstakes for things like a Xbox 1S Fortnite bundle or a ASUS ROG Gaming laptop bundle, or, you can redeem the points for gift cards like a Target gift card or a Walmart gift card, for example.

You can use the Bing search engine to help you get points. Every time you search something up with Bing, you get 5 points. But most $5 gift cards cost 6500 points, which are going to take 1300 searches! That's going to take forever!

With the ABPC, it will only take 43 1/3 days to get 6500 points. (Due to the 150 point limit Bing rewards you with)

Using the ABPC

1. Open a browser (Chrome is highly recommend, but whatever runs fastest on your computer.)

2. Make your browser the active window by clicking on it.

3. Open a new tab. Although the ABPC wouldn't ruin your other tabs running, it's best to have a safety margin.

4. Connect digital pin 2 to ground and let it run. The ABPC status is displayed on the built in LED or a LED connected to pin 13. ON = Running. OFF = Stopped.

5. Once you are done, disconnect digital pin 2. DO NOT DO ANYTHING UNTIL PIN 13 IS LOW, (INDICATED BY THE BUILT IN LED OR A LED CONNECTED TO PIN 13) AS THE ARDUINO MAY STILL BE TYPING OR CLOSING A TAB AND THAT MAY PRODUCE UNEXPECTED RESULTS.

6. Repeat the next day.

How the code works

We first include the keyboard library. Then we declare what ctrlkey means. Make sure you declare the correct one based on your OS. For Mac OSX, use: char ctrlKey = KEY_LEFT_GUI; For Windows and UNIX-based OS, use: char ctrlKey = KEY_LEFT_CTRL; (Chrome OS and derivatives are UNIX-based.)

Then setup begins. We set the pin mdoes using pinMode(pin,mode);. Then we start the keyboard using Keyboard.begin();. Then we seed the random generator by using randomSeed(value);.

Loop starts. We check if pin 2 is LOW (Because of the internal pull-up). If it is LOW, then we open a new tab, go to Bing.com, then we type some random characters, wait for it to load and give us points, and then closes the tab. Then pin 13 is set LOW, indicating that the ABPC is done. We wait 100 milliseconds to give the computer time to react. Then we go back to the start of loop.

Code

ABPCC/C++
Upload to Arduino Leonardo
#include "Keyboard.h"

// Before starting, make Chrome the active window.

// Use this option for Mac OSX.
// Comment it out if using Windows or Linux:
// char ctrlKey = KEY_LEFT_GUI;
// Use this option for Windows and UNIX-based OS.
// Comment it out if using Mac OSX:
char ctrlKey = KEY_LEFT_CTRL;


void setup() {
  pinMode(2, INPUT_PULLUP);
  pinMode(13, OUTPUT);
  pinMode(A0, INPUT);

  Keyboard.begin();
  randomSeed(A0);
}

void loop() {
  if (digitalRead(2) == LOW) {
    digitalWrite(13, HIGH);
    Keyboard.press(ctrlKey);
    Keyboard.press('t');
    delay(500);
    Keyboard.releaseAll();
    delay(500);
    Keyboard.println("bing.com");
    delay(5000);
    for (int x = 1; x < 10; x++) {
      Keyboard.write(random(33, 128));
    }
    delay(1000);
    Keyboard.write(KEY_RETURN);
    delay(5000);
    Keyboard.press(ctrlKey);
    Keyboard.press('w');
    delay(500);
    Keyboard.releaseAll();
  }
  digitalWrite(13, LOW);
  delay(100);
}

Schematics

Fritzing files
abpc_yrx67KDwlV.fzz

Comments

Similar projects you might like

Automatic Watering System

Project tutorial by PRosenb

  • 16,668 views
  • 18 comments
  • 41 respects

RFID Based Automatic Door System

Project showcase by Robodia Technology

  • 38,071 views
  • 22 comments
  • 102 respects

Advance Automatic Railway Crossing System

Project showcase by Akansh Saxena and Pawan singh

  • 2,438 views
  • 1 comment
  • 13 respects

Automatic Watering System

Project tutorial by Manson Hau

  • 9,892 views
  • 11 comments
  • 39 respects

Gesture / Motion Controlled Automatic Appliances

Project tutorial by ashraf_minhaj

  • 1,612 views
  • 0 comments
  • 11 respects
Add projectSign up / Login