How to solve signal to be detected in same time?

Excuse me.
I am a process engineer.

Recently, I got a BBB board from a old control box in office room.
Now I want to make a monitoring system of product line by BBB board.
I don’t know electronic circuit, but I read a book of BBB board.
I am difficult to understand GPIO, I2C, PWM, ADC and real-time interface.
Plz help me. Thank you very much.

I think 20 photosensors and 10 PIR sensors will connect BBB board.
The photosensor will check quantity of products passed on conveyor belt.
The PIR sensor will check whether person is at workstation.

Now I have some questions.

  1. I think it check rising edge or falling edge of sensor signal, so I can know a product is passed. Now I don’t know which kind of ports is connected? GPIO, ADC, PWM or real-time?
  2. photosensor output analog signal or digital signal?
  3. Does the BB Black have enough ports?
  4. In book, I know sampling rate. I don’t know how to calculate it.
  5. If two or more sensors are detected in same time, I don’t know how to solve this problem.
  6. Should I use python or C/C++ for programming?

Thank you very much!
Have a nice day.

About analog signal and digital signal, I check following.

Photoelectric sensor, I know it is only a switch.

在 2018年2月11日星期日 UTC+8下午9:48:28,Mr.W1026写道:

I read some blogs.
In Adafruit_BBIO,
int add_edge_detect(unsigned int gpio, unsigned int edge);
int add_edge_callback(unsigned int gpio, void (*func)(unsigned int gpio));
can solve my problem.
I will try it.

在 2018年2月11日星期日 UTC+8下午9:48:28,Mr.W1026写道: