Find Jobs
Hire Freelancers

Python script for Raspberry Pi

$10-200 USD

Completed
Posted about 10 years ago

$10-200 USD

Paid on delivery
I need help to write a python program described below to read rfid tags, activate two relays and save rfid number to MySQL database. ----------- Equipment ----------- I will use the following products for this project: - Raspberry Pi B with ethernet connection and Raspbian OS (OS can of course be changed if needed) - SainSmart 5V 2 Channel Relay - MAX3232 RS232 Serial Port To TTL Converter Module - RFID-reader with RS232 connection to the TTL converter module ----------- Programming details----------- MySQL database specification: Two tables; one table named MF_Logg with fields Logg_ID, Logg_RFID_ID and Logg_Tid, one table named MF_Djur with fields Djur_RFID_ID, Djur_Namn, Djur_Intervall, Djur_Intervall_Foder1, Djur_Intervall_Foder2, Djur_Foder1 and Djur_Foder2. Programming details: 1. When a rfid tag is read, the rfid number is controlled in the MF_Djur table (field Djur_RFID_ID). 1.1 If tag number exist in table MF_Djur: 1.1.1 Read the datetime for the latest time the tag was recorded in MF_Logg (A) and read the value of Djur_Intervall (minutes) from table MF_Djur (B). 1.1.1.1 If current time is within time interval A + B minutes: Read values from field Djur_Intervall_Foder1 and Djur_Intervall_Foder2 and activate the relay 1 for the time (seconds) specified in Djur_Intervall_Foder1 and activate the relay 2 for the time (seconds) specified in Djur_Intervall_Foder2. 1.1.1.2 If current time is not within time interval: Read values from field Djur_Foder1 and Djur_Foder2 and activate the relay 1 for the time (seconds) specified in Djur_Foder1 and activate the relay 2 for the time (seconds) specified in Djur_Foder2. Write tag number and current date and time to table MF_Logg. If internet connection exist: MySQL table need to synchronize with a MySQL database on another server on Internet. 1.1.2 Block the script from taking any action if the rfid tag number is read within the next 15 minutes. 1.2 If tag number does not exist in table MF_Djur: 1.2.1 In table MF_Djur save rfid number to Djur_RFID_ID, set Djur_Intervall to 180, set all four Foder-fields to 2. 1.2.2 Activate both relays for 2 seconds 1.2.3 Write tag number and current date and time to table MF_Logg. 1.2.4 If/when internet connection exist: Syncronize both tables with MySQL database on other server. 1.2.5 Block the script from taking any action if the rfid tag number is read within the next 15 minutes. - When the Raspberry Pi starts up, this program must autostart. - Script must be well commented. - All changes made in Linux must be specified in a text document so I can read how to get it up and running even if I have to make a new install. ----------- Comments----------- - If you suggest that the coding can be made better in another language, please tell me in your bid description so I know before I choose a coder. - I prefer fixed bids and will not rent a coder on hourly rates.
Project ID: 5508645

About the project

1 proposal
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I have strong experience in Python development for Raspberry Pi. I can do this. Look forward to working with you. Thank you.
$200 USD in 7 days
4.9 (48 reviews)
5.7
5.7

About the client

Flag of SWEDEN
Slite, Sweden
5.0
61
Payment method verified
Member since Feb 7, 2005

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.