Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Code to use output from arduino as input (help)
As you may have gathered from the title, I have no idea what I am talking about. I spent all of 10 minutes trying to come up with the title and that is all I could say. I have little to no experience with python but for some reason, I am required to use it for a project in one of my classes. after searching for hours I thought that this might be the best place to ask something like this. Please have mercy on my soul for being brain-dead in this field. I am a first year and have very little clue what I am doing.

Now on to the problem. I have a project I need to make with a Raspberry Pi and an Arduino. Basically, I have to make a security system with a laser transmitter and sensor. If the sensor detects the laser, it will return a HIGH output and when it detects no laser it will output LOW. This device connects to the Arduino and can be monitored through USB connection by a Rasberry Pi (basically using the Arduino as a slave to run to code and return the values from the sensor). Then I need to process to code somehow so that I can use it to send an email automatically using ssmtp. This is where my problem lies. I have 0 clues how to grab the output of the Arduino and to input it to a code to send an email. This process needs to be all automatic so my best guess is I have to somehow create a loop that checks every couple of seconds whether or not the laser is detected or not. Then use that value to determine whether or not to send the email.

I can't think of any way to do this (just because I have very little idea of how python works) and thus haven't really thought of anything to try as of yet.

Please, any information can help, I appreciate from the bottom of my hearts anything contributed. Thanks! Heart Smile

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to repeat input line of code until condition is met Reta 2 308 May-14-2019, 10:06 PM
Last Post: nilamo
  Wrong output on my code. JTNA 2 435 Apr-04-2019, 01:55 PM
Last Post: JTNA
  Unable to output the indices from an input file rainbow2312 1 1,034 Nov-18-2017, 05:53 PM
Last Post: heiner55
  What this code will output and why? Valgard 4 1,414 Aug-30-2017, 01:41 PM
Last Post: Valgard
  adding to code but still getting same output Crackity 7 1,688 Jul-12-2017, 02:36 PM
Last Post: buran

Forum Jump:

Users browsing this thread: 1 Guest(s)