1

What I would like to do, is to let the Raspberry Pi run and while it is running, connect and disconnect eg. sensors whenever I please to/from the breadboard WITHOUT turning off/disconnecting the Pi from the breadboard.

As far as I know, there could be trouble because of the unregular voltage and in the worst case, the Pi would get killed. Is there a piece of hardware which enables me to do so? I have heard about giving an external source of electricity for the breadboard but I am looking for something different, something more "mobile".

  • I reconnect things all the time while its running, never had an issue. BUT the reason why you SHOULD turn it off is because if you make a mistake by accidentally creating a short or something you don't have to correct the mistake before you turn the pi back on. Plus if code running on the pi is accessing the GPIO and you mess with it, it could cause weird behavior. But if its just an led that your taking in and out, I wouldn't expect there to be a problem. – Chad G Feb 12 at 17:47
  • As I said, it should be sensors and actuators not only leds. And yes, the code running on the pi is accessing the GPIO – beginner Feb 15 at 9:26
  • Then your code needs to be able to handle the hot swap. It needs to be able to reset/configure the device when it becomes present again. And not crash or do bad things when the sensor gets taken away. I realize thats broad, but it really depends on what type of sensor and what the data is being used for. Or i guess you just said you dont want to turn the pi off, but maybe you will have stopped the program, in which case it gets a little easier. – Chad G Feb 15 at 17:27
  • The problem is that it should work for any kind of sensors and actuators... – beginner Feb 16 at 9:40
  • then you have to design your code to handle hot swapping of any type of sensor. Some sensors require certain setup procedures, or certain amount of up time before they are reliable, so you will have to code for those possible issues. – Chad G Feb 21 at 0:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.