Python Forum
Code to use output from arduino as input (help)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code to use output from arduino as input (help)
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  No desired output for code. James349 1 935 May-19-2023, 05:43 PM
Last Post: deanhystad
  Create code for input names and score for 15 student Davin 2 2,006 Sep-21-2020, 08:49 AM
Last Post: DeaD_EyE
  How to repeat input line of code until condition is met Reta 2 3,331 May-14-2019, 10:06 PM
Last Post: nilamo
  Wrong output on my code. JTNA 2 7,854 Apr-04-2019, 01:55 PM
Last Post: JTNA
  Unable to output the indices from an input file rainbow2312 1 2,944 Nov-18-2017, 05:53 PM
Last Post: heiner55
  What this code will output and why? Valgard 4 3,841 Aug-30-2017, 01:41 PM
Last Post: Valgard
  adding to code but still getting same output Crackity 7 4,505 Jul-12-2017, 02:36 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020