tag:blogger.com,1999:blog-7377057412446264720.post200461112760239805..comments2023-07-10T00:13:42.099-04:00Comments on <a href="http://antipastohw.blogspot.com/">Antipasto Hardware Blog</a>: Passing large values between the Arduino to the TouchShieldUnknownnoreply@blogger.comBlogger5125tag:blogger.com,1999:blog-7377057412446264720.post-16120726058792508022010-09-09T15:01:25.042-04:002010-09-09T15:01:25.042-04:00i have some problems transferring some integers fr...i have some problems transferring some integers from arduino to touch shield. I've put a problem on arduino forum<br /> <br />"Serial comunication problem" by gvi70000<br /><br />One more question. Can we use EEPROM.h to store some values on the slide? If yes, what are the restrictions ?www.grozeaion.comhttps://www.blogger.com/profile/12362454701577627111noreply@blogger.comtag:blogger.com,1999:blog-7377057412446264720.post-59394592127257660772010-09-09T14:59:18.057-04:002010-09-09T14:59:18.057-04:00i have some problems transferring some integers fr...i have some problems transferring some integers from arduino to touch shield. I've put a problem on arduino forum<br /> <br />"Serial comunication problem" by gvi70000<br /><br />One more question. Can we use EEPROM.h to store some values on the slide? If yes, what are the restrictions ?www.grozeaion.comhttps://www.blogger.com/profile/12362454701577627111noreply@blogger.comtag:blogger.com,1999:blog-7377057412446264720.post-62778184428591813962010-09-09T14:56:21.866-04:002010-09-09T14:56:21.866-04:00i have some problems transferring some integers fr...i have some problems transferring some integers from arduino to touch shield. I've put a problem here<br />http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swtrouble<br /> <br />"Serial comunication problem" by gvi70000<br /><br />One more question. Can we use EEPROM.h to store some values on the slide? If yes, what are the restrictions ?www.grozeaion.comhttps://www.blogger.com/profile/12362454701577627111noreply@blogger.comtag:blogger.com,1999:blog-7377057412446264720.post-36095026878234449302009-03-24T07:25:00.000-04:002009-03-24T07:25:00.000-04:00why are you using mySerial.print(highByte);instead...why are you using mySerial.print(highByte);<BR/>instead of <BR/>Serial.print(highByte);<BR/><BR/>Is there a reason for this? Are you using some special library not shown in this example?Dan Thompsonhttps://www.blogger.com/profile/09932336949749833460noreply@blogger.comtag:blogger.com,1999:blog-7377057412446264720.post-1873284413138289322008-12-09T11:07:00.000-05:002008-12-09T11:07:00.000-05:00Dave writes:C doesn't guarantee left-to-right ...Dave writes:<BR/><BR/>C doesn't guarantee left-to-right order<BR/>of operand evaluation. So even though<BR/>the getValue assignment --<BR/><BR/> ..<BR/> On the TouchShield, I use this code:<BR/><BR/> int getValue = (Serial.read() < < 8) + Serial.read();<BR/><BR/> This first calls Serial.read() to<BR/> get the high bit. The " < < 8" means<BR/> bit shift the byte up (to the left)<BR/> ..<BR/><BR/>-- will usually work, doing something<BR/>like changing optimization levels could<BR/>lead to the second Serial.read() being<BR/>evaluated before the first one. So it<BR/>has to be<BR/><BR/> int getValue = Serial.read();<BR/> getValue = (getValue<<8) + Serial.read();<BR/><BR/>or whatever, to be safe.<BR/><BR/><BR/>Thanks a lot - I've just updated the post!Matthttps://www.blogger.com/profile/16654483670622465259noreply@blogger.com