<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Arduino does not like my pointers! - Arduino				            </title>
            <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/</link>
            <description>Discussion board for Robotics, Arduino, Raspberry Pi and other DIY electronics and modules. Join us today!</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 12 Aug 2026 17:54:57 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Arduino does not like my pointers!</title>
                        <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50817</link>
                        <pubDate>Sat, 22 Feb 2025 14:21:57 +0000</pubDate>
                        <description><![CDATA[unsigned char *cPtr  works.
As for the atoi() it  will  not. I was thinking that the odd characters would have some ascii value but no.
Thanks for your inputs.]]></description>
                        <content:encoded><![CDATA[<p>unsigned char *cPtr  works.</p>
<p>As for the atoi() it  will  not. I was thinking that the odd characters would have some ascii value but no.</p>
<p>Thanks for your inputs.</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>HarryA</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50817</guid>
                    </item>
				                    <item>
                        <title>RE: Arduino does not like my pointers!</title>
                        <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50806</link>
                        <pubDate>Fri, 21 Feb 2025 17:38:33 +0000</pubDate>
                        <description><![CDATA[A better way to do this is to use codeblocks or some other ide that lets you look into memory location so you can see what is stored and how it is stored.
That way you can go to the pointer...]]></description>
                        <content:encoded><![CDATA[<p>A better way to do this is to use codeblocks or some other ide that lets you look into memory location so you can see what is stored and how it is stored.</p>
<p>That way you can go to the pointer address itself</p>
<p>-----</p>
<p>Anyways ....</p>
<p>You assigned an int pointer to a character pointer which is ok.</p>
<p>But now the char pointer is now pointing at an 8 bit value. </p>
<p>If that value is below 32 that is a control character and is  a non-printable ascii value.</p>
<p> </p>
<p> </p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>noweare</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50806</guid>
                    </item>
				                    <item>
                        <title>RE: Arduino does not like my pointers!</title>
                        <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50804</link>
                        <pubDate>Fri, 21 Feb 2025 02:46:59 +0000</pubDate>
                        <description><![CDATA[This site is great, but you might want to watch this video on using pointers. Just an FYI]]></description>
                        <content:encoded><![CDATA[<p>This site is great, but you might want to watch this video on using pointers. Just an FYI</p>
<p>https://youtu.be/jdQaaFNpM_4</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>thespamcatcher</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50804</guid>
                    </item>
				                    <item>
                        <title>RE: Arduino does not like my pointers!</title>
                        <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50800</link>
                        <pubDate>Thu, 20 Feb 2025 21:59:16 +0000</pubDate>
                        <description><![CDATA[I got this from the Arduino site. This is a lengthy discussion on the problem. I still don&#039;t understand it but I can see where I would like to parse an array for a bit and act on that bit th...]]></description>
                        <content:encoded><![CDATA[<p>I got this from the Arduino site. This is a lengthy discussion on the problem. I still don't understand it but I can see where I would like to parse an array for a bit and act on that bit then put it back, or do the same with a byte or a character. </p>
<p> </p>
<p>https://forum.arduino.cc/t/strings-pointers/657671</p>
<p> </p>
<p> </p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>bits2bots</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50800</guid>
                    </item>
				                    <item>
                        <title>RE: Arduino does not like my pointers!</title>
                        <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50798</link>
                        <pubDate>Thu, 20 Feb 2025 21:10:59 +0000</pubDate>
                        <description><![CDATA[@harrya
I think that your problem is that you are assuming that the &#039;1025&#039; is stored as a series of characters instead of the binary value that yo originally stored there. So the value stor...]]></description>
                        <content:encoded><![CDATA[<p>@<span>harrya</span></p>
<p>I think that your problem is that you are assuming that the '1025' is stored as a series of characters instead of the binary value that yo originally stored there. So the value stored at the location iValue is 10000000001 binary or 401 hex.</p>
<p>You must remember that the value stored in a computer depends on the type of value stored and you must extract and process it according to the form it was loaded. So here, the value 1025 its stored as a binary  value and you are trying to interpret the bytes at that location as a character string</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>Will</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50798</guid>
                    </item>
				                    <item>
                        <title>RE: Arduino does not like my pointers!</title>
                        <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50797</link>
                        <pubDate>Thu, 20 Feb 2025 20:56:31 +0000</pubDate>
                        <description><![CDATA[I think it may be more useful to ask this question:
Why do you think the output is wrong?
What do you think atoi does?
hint: look up the description of atoi.]]></description>
                        <content:encoded><![CDATA[<p>I think it may be more useful to ask this question:</p>
<p>Why do you think the output is wrong?</p>
<p>What do you think atoi does?</p>
<p>hint: look up the description of atoi.</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>TFMcCarthy</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50797</guid>
                    </item>
				                    <item>
                        <title>RE: Arduino does not like my pointers!</title>
                        <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50796</link>
                        <pubDate>Thu, 20 Feb 2025 20:55:49 +0000</pubDate>
                        <description><![CDATA[I&#039;m a newbie, can&#039;t research now but I like the problem. My guess is the define statements or mixed data types assigned to variable issue. I&#039;ll be back!]]></description>
                        <content:encoded><![CDATA[<p>I'm a newbie, can't research now but I like the problem. My guess is the define statements or mixed data types assigned to variable issue. I'll be back!</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>bits2bots</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50796</guid>
                    </item>
				                    <item>
                        <title>Arduino does not like my pointers!</title>
                        <link>https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50794</link>
                        <pubDate>Thu, 20 Feb 2025 20:33:58 +0000</pubDate>
                        <description><![CDATA[Greetings from Pennsylvania.
On playing with pointers I get odd results that I do not understand. Perhaps you all can understand the problem. This is the code and attached are the results. ...]]></description>
                        <content:encoded><![CDATA[<p>Greetings from Pennsylvania.</p>
<p>On playing with pointers I get odd results that I do not understand. Perhaps you all can understand the problem. This is the code and attached are the results. Thanks for looking.</p>
<pre contenteditable="false">#define print Serial.print
#define printf Serial.println
void setup() 
{
  Serial.begin(9600);
}

void loop()
{
  int iValue = 1025; // .... .... 00000100 00000001 
  int *iPtr = &amp;iValue; 
  char *cPtr;
  
  cPtr = (char*)iPtr;        //typecasting 

  print(" *iPtr ");      printf(*iPtr); // should be 1025 - okay
   
  print(" *cPtr ");      printf(*cPtr); // should be 1 at first byte;  got inverted L
  print(" *(cPtr+1) ");  printf(*(cPtr+1)); // should be 4 at second byte; got flipped L

  print(" atoi(*cPtr) ");      printf(atoi(*cPtr)); // should be ascii value of odd char 1
  print(" atoi(*(cPtr+1)) ");  printf(atoi(*(cPtr+1))); // should be ascii value ofaodd char 2
 
  delay(1000);

}</pre>
<p><br /><br /></p>
10176]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>HarryA</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/arduino-does-not-like-my-pointers/#post-50794</guid>
                    </item>
							        </channel>
        </rss>
		