There should be plenty of examples out there of how to do this.In asking a question like this, the more information that you provide, describing the approach you are taking and the results that you are getting, the more likely it is that people are going to be able to help you.Providing you code, and examples of the data you are getting will help people better understand the problem.
![]() Arduino To Arduino Serial Communication How To Do ThisAlso it helps if you can explain your skills and level of understanding of codingcomputing to people can frame their response better. First off, I am not an ardunio expert (in fact I have never used one myself), but I have a lot of knowledge in writing communication software. From here I would suspect things like baudrate and signaling voltages, etc. Arduino To Arduino Serial Communication Serial Streams BeingAre the PC and arduino talking on the same baudrate (I notice that there are two serial streams being used here, Serial and Serial1, which is talking to the PC) Is the ardunio communication in true RS232 levels These would be my first guesses as to why you are getting garbage data back. Garbage data is a good indication that the two ends of the serial link are not talking the same language (i.e. If you have access to an oscilloscope you could verify baudrate and voltage levels fairly easily. The posted code is incomplete and confusing - so post complete code for both the sender and the receiver. Also indicate which pins are connected between the two Arduinos. Are you trying to use I2C (Wire Library) or Serial (Serial1) to communicate between the Arduinos It appears the two are being mixed. I suggest trying working code from the many available examples first. For example if trying to use I2C to communicate between the two then Arduino has this example. Be sure to connect to the correct pins on the Mega for SDA and SCL. If trying to use Serial communication between two Arduinos then doing an internet search turns up this. Note that RX and TX are crossed when using Serial - i.e. RX connects to TX and TX connects to RX. ![]() Follow element14 Facebook Twitter pf.footer.follow.linkedin.link YouTube Content Participate Learn Discuss Build Find Products Store About Us Feedback Support FAQs Terms of Use Privacy Policy Cookies Sitemap A Premier Farnell Company 2009-2020 Premier Farnell Ltd. ICP 10220084. Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE element14 Software Version: 9.0.5.10 jx, revision: 20190618211432.998b920.lithium9.0.5.x-jx.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |