Text API control | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Text API control

I want to receive a text API from an ECU and when data received want to glow led on raspberry pi. Can anyone help??

3rd Apr 2017, 9:54 AM
Rutuja Chakor
Rutuja Chakor - avatar
5 Answers
+ 6
@seamiki Can you actually fry the Pi? I mean doesn't it have some sort of a safety check if you put too high voltage there?
3rd Apr 2017, 3:51 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 5
@seamiki Thanks, man. I never even assumed to look it up, before I start tinkering. You probably saved my Pi! :)
3rd Apr 2017, 5:26 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 3
if you mean automotive ECU, you'd be better off listening data from CAN Bus through the ODB connector. below is an instructable using arduino (you can adapt it for other mcu). http://www.instructables.com/id/CAN-Bus-Sniffing-and-Broadcasting-with-Arduino/ Do some research if you don't want to use premade shields: it's not difficoult to make your ODB to ttl adapter yourself, if electronics don't scare you. Below, a tutorial about raspberry pi and CAN Bus: http://www.cowfishstudios.com/blog/canned-pi-part1 Beware that the rpi is more delicate than an arduino when it comes to GpI/O.
3rd Apr 2017, 10:38 AM
seamiki
seamiki - avatar
+ 3
@Kuba The pins connect directly to the broadcom chip. Any sort of protection has to be done by the user. Max source/sink current throughout the whole GPI/O header is 16 mA with a limit to 3mA per pin (with the exception of the 5V and 3.3V rail). Any error will damage the broadcom chip. I usually use the arduino for the sensor stuff and connect it (externally powered) serially to the rpi via usb. USB on the rpi has fuse protection and arduino allows analong input. Any gui or network interface is implemented with the rpi.
3rd Apr 2017, 4:49 PM
seamiki
seamiki - avatar
+ 2
@Kuba Glad it helped. Optoisolators and darlington arrays on separate power supplies if it is strictly necessary to wire the rpi GPI/O directly. But again, arduino on external power and connected to the rpi via usb is much safer and cleaner.
3rd Apr 2017, 5:43 PM
seamiki
seamiki - avatar