The main objective is to reduce loss in revenue due to delayed shelf-restocking (when product is in-stock in the store but not stocked on the shelf) and inaccurate forecasting (under-estimating future product sales) practices. The result is to demonstrate inventory automation using ECIS system by enabling the means to monitor and track store inventory in real-time, perform data analysis remotely in cloud, improve shopping experience for the consumers and increase revenue for the retailers in the retail industry. Machine Learning code can be found on my GitHub: https://github.com/priyankkalgaonkar

Dependencies:   mbed

ECE 53301: Wireless and Multimedia Computing Final Project Report – Group 1

Inventory Automation Using Electronically Connected Intelligent Shelves.

Code Developed by: Priyank Kalgaonkar.

Department of Electrical and Computer Engineering, Purdue School of Engineering and Technology at IUPUI.

Submitted as partial fulfillment for the requirement of Fall 2019 - ECE 53301-26877: Wireless and Multimedia Computing course.

Date of Submission: December 12, 2019.

Committer:
priyank12p
Date:
Thu Dec 12 01:04:52 2019 +0000
Revision:
0:b0c4c25d37ab
Initial Commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
priyank12p 0:b0c4c25d37ab 1 /* Copyright (c) 2013 Prabhu Desai
priyank12p 0:b0c4c25d37ab 2 * pdtechworld@gmail.com
priyank12p 0:b0c4c25d37ab 3 *
priyank12p 0:b0c4c25d37ab 4 *
priyank12p 0:b0c4c25d37ab 5 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
priyank12p 0:b0c4c25d37ab 6 * and associated documentation files (the "Software"), to deal in the Software without restriction,
priyank12p 0:b0c4c25d37ab 7 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
priyank12p 0:b0c4c25d37ab 8 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
priyank12p 0:b0c4c25d37ab 9 * furnished to do so, subject to the following conditions:
priyank12p 0:b0c4c25d37ab 10 *
priyank12p 0:b0c4c25d37ab 11 * The above copyright notice and this permission notice shall be included in all copies or
priyank12p 0:b0c4c25d37ab 12 * substantial portions of the Software.
priyank12p 0:b0c4c25d37ab 13 *
priyank12p 0:b0c4c25d37ab 14 * For more details on the sensor :
priyank12p 0:b0c4c25d37ab 15 * http://www.elecfreaks.com/store/hcsr04-ultrasonic-sensor-distance-measuring-module-p-91.html?zenid=pgm8pgnvaodbe36dibq5s1soi3
priyank12p 0:b0c4c25d37ab 16 *
priyank12p 0:b0c4c25d37ab 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
priyank12p 0:b0c4c25d37ab 18 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
priyank12p 0:b0c4c25d37ab 19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
priyank12p 0:b0c4c25d37ab 20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
priyank12p 0:b0c4c25d37ab 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
priyank12p 0:b0c4c25d37ab 22 */
priyank12p 0:b0c4c25d37ab 23
priyank12p 0:b0c4c25d37ab 24 #ifndef MBED_HCSR04_H
priyank12p 0:b0c4c25d37ab 25 #define MBED_HCSR04_H
priyank12p 0:b0c4c25d37ab 26
priyank12p 0:b0c4c25d37ab 27 #include "mbed.h"
priyank12p 0:b0c4c25d37ab 28
priyank12p 0:b0c4c25d37ab 29 /** HCSR04 Class(es)
priyank12p 0:b0c4c25d37ab 30 */
priyank12p 0:b0c4c25d37ab 31
priyank12p 0:b0c4c25d37ab 32 class HCSR04
priyank12p 0:b0c4c25d37ab 33 {
priyank12p 0:b0c4c25d37ab 34 public:
priyank12p 0:b0c4c25d37ab 35 /** Create a HCSR04 object connected to the specified pin
priyank12p 0:b0c4c25d37ab 36 * @param pin i/o pin to connect to
priyank12p 0:b0c4c25d37ab 37 */
priyank12p 0:b0c4c25d37ab 38 HCSR04(PinName TrigPin,PinName EchoPin);
priyank12p 0:b0c4c25d37ab 39 ~HCSR04();
priyank12p 0:b0c4c25d37ab 40
priyank12p 0:b0c4c25d37ab 41 /** Return the distance from obstacle in cm
priyank12p 0:b0c4c25d37ab 42 * @param distance in cms and returns -1, in case of failure
priyank12p 0:b0c4c25d37ab 43 */
priyank12p 0:b0c4c25d37ab 44 unsigned int get_dist_cm(void);
priyank12p 0:b0c4c25d37ab 45 /** Return the pulse duration equal to sonic waves travelling to obstacle and back to receiver.
priyank12p 0:b0c4c25d37ab 46 * @param pulse duration in microseconds.
priyank12p 0:b0c4c25d37ab 47 */
priyank12p 0:b0c4c25d37ab 48 unsigned int get_pulse_us(void);
priyank12p 0:b0c4c25d37ab 49 /** Generates the trigger pulse of 10us on the trigger PIN.
priyank12p 0:b0c4c25d37ab 50 */
priyank12p 0:b0c4c25d37ab 51 void start(void );
priyank12p 0:b0c4c25d37ab 52 void isr_rise(void);
priyank12p 0:b0c4c25d37ab 53 void isr_fall(void);
priyank12p 0:b0c4c25d37ab 54 void fall (void (*fptr)(void));
priyank12p 0:b0c4c25d37ab 55 void rise (void (*fptr)(void));
priyank12p 0:b0c4c25d37ab 56
priyank12p 0:b0c4c25d37ab 57
priyank12p 0:b0c4c25d37ab 58
priyank12p 0:b0c4c25d37ab 59 private:
priyank12p 0:b0c4c25d37ab 60
priyank12p 0:b0c4c25d37ab 61 Timer pulsetime;
priyank12p 0:b0c4c25d37ab 62 DigitalOut trigger;
priyank12p 0:b0c4c25d37ab 63 InterruptIn echo;
priyank12p 0:b0c4c25d37ab 64 unsigned int pulsedur;
priyank12p 0:b0c4c25d37ab 65 unsigned int distance;
priyank12p 0:b0c4c25d37ab 66 };
priyank12p 0:b0c4c25d37ab 67
priyank12p 0:b0c4c25d37ab 68 #endif