ccurran689
Posts: 13
Joined: Sat Sep 26, 2015 9:55 am

Using the TX and RX in C code

Tue Oct 06, 2015 9:23 pm

I am looking to connect a card reader to the pi and when the card is read it will start a 5 minute timer ( this card will be the master card). Once that card has been swiped if another card is swiped in the 5 minutes it will turn on a LED and send an email. If the card is swiped 5 minutes after the first 5 minutes ends it will Light a separate LED and send a different email.

I am quite new to C code and have never used RX and TX before, I am looking to simulate an input (the card) using my pc until I can get the needed equipment. Any help would be great as I am a bit lost trying to find the code.

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Using the TX and RX in C code

Tue Oct 06, 2015 10:18 pm

With TX and RX I assume that you are refering to the UART pins on the GPIO of the Raspberry Pi.

You should start by reading this: http://elinux.org/RPi_Serial_Connection ... peripheral

A lot of other guides can be found by googling "raspberry pi using ttyama0": https://www.google.no/webhp?#q=raspberr ... %20ttyama0

Return to “Beginners”