<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: SensorBox  and more analog inputs with Arduino Mega</title>
		<atom:link href="http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 22:33:58 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-46619</guid>
					<title><![CDATA[SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-46619</link>
					<pubDate>Sat, 16 Jun 2012 05:59:51 +0000</pubDate>
					<dc:creator>edsonedge</dc:creator>

					<description>
						<![CDATA[
						<p>Hi</p>
<p>I am trying to get more than 6 analog inputs, into max from my Arduino Mega board  (It has 16 , I want to use eight for now) </p>
<p>I have tried fiddling with both the sensorbox patches, with no luck</p>
<p>Do I need to change the arduino code maybe?  (I took a look at it, but couldn´t figure out what needed to be changed if anything (to be honest my programming skills with the arduino are quite limited))</p>
<p>Anyone have any clue?</p>
<p>All the best</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167706</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167706</link>
					<pubDate>Sat, 16 Jun 2012 08:27:30 +0000</pubDate>
					<dc:creator>n00b_meister</dc:creator>

					<description>
						<![CDATA[
						<p>Hi<br />
I&#8217;m not familiar with Sensorbox, but look for the statements</p>
<p>analogRead() and Serial.write().</p>
<p>Depending on the version of the Arduino IDE you use it may be</p>
<p>analogRead(A0); //for pin 0 and</p>
<p>Serial.print(foo, BYTE); //or<br />
Serial,write(foo);</p>
<p>You simply need to add further read and write statements for the extra input pins; the Mega (and Arduino 1.0) use A0-A15 (or 0-15).</p>
<p>Maybe show us the Sensorbox Arduino sketch?</p>
<p>Brendan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167707</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167707</link>
					<pubDate>Sat, 16 Jun 2012 08:43:34 +0000</pubDate>
					<dc:creator>Medd</dc:creator>

					<description>
						<![CDATA[
						<p>Slightly off-topic: Brendan, I think it&#8217;s about time you put together a tutorial for the front page. It seems that every Arduino question ends up being answered by you. I know I&#8217;m mainly a Maxuino man, but I reckon a comprehensive tutorial specifically about interfacing with Max would get me rolling my own Arduino sketches more often!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167708</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167708</link>
					<pubDate>Sat, 16 Jun 2012 09:50:58 +0000</pubDate>
					<dc:creator>n00b_meister</dc:creator>

					<description>
						<![CDATA[
						<p>Hi dickmedd<br />
not OT; in fact good call.</p>
<p>If this idea receives any +1&#8242;s then I&#8217;ll certainly put a short toot together. Meanwhile, there&#8217;s some serial interfacing instructions on my blog</p>
<p><a href="http://brendan-admi.blogspot.co.uk/" rel="nofollow">http://brendan-admi.blogspot.co.uk/</a></p>
<p>Brendan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167709</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167709</link>
					<pubDate>Sat, 16 Jun 2012 12:26:39 +0000</pubDate>
					<dc:creator>edsonedge</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Meister Noob</p>
<p>Thanks for the reply</p>
<p>this is the SensorBox I am talking about</p>
<p><a href="http://cycling74.com/toolbox/sensorbox/" rel="nofollow">http://cycling74.com/toolbox/sensorbox/</a></p>
<p>Can´t seem to find (in the proccessing/arduino  code)  where I can specify more analog inputs.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167710</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167710</link>
					<pubDate>Sat, 16 Jun 2012 12:34:46 +0000</pubDate>
					<dc:creator>matpe</dc:creator>

					<description>
						<![CDATA[
						<p>+ 1 :)</p>
<p>mat</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167711</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167711</link>
					<pubDate>Sun, 17 Jun 2012 13:19:04 +0000</pubDate>
					<dc:creator>n00b_meister</dc:creator>

					<description>
						<![CDATA[
						<p>I had a brief (and inexpert) glance at Andrew&#8217;s Arduino sketch, and he is using an array to store/read/send values from the input pins, digital and analog. He&#8217;s also doing some bit-manipulation to get the full 10-bit resolution into Max; this method is a little unfamiliar to me, but I see what he&#8217;s doing.</p>
<p>Besides writing a complete sketch and patch to access the extra analog inputs for you, the only thing I can suggest is you might try changing the local variable &#8220;g&#8221; range here:</p>
<p>  //read analog pins<br />
  for (int g = 0;g&lt;6;g++){<br />
    packValue(g);<br />
  }<br />
  char total = current+1;</p>
<p>Which is filling the array with analogValues from pins 0 -5</p>
<p>from g&lt;6 to:</p>
<p>for (int g = 0; g&lt;15; g++){</p>
<p>This MAY help address inputs 0-15 BUT it may well break the sketch too, and furthermore you&#8217;ll have to make changes to the Max patch to accommodate the extra input. Do so at your own risk, sorry I don&#8217;t have more time to solve this for ya. And I also hope Andrew doesn&#8217;t chip in to WAIL on me, for dispensing ignorance.</p>
<p>Brendan</p>
<p>ps<br />
Anymore +1&#8242;s and I&#8217;ll post a short toot on accessing all analog inputs via a DIY Arduino sketch and Max patch. On my new ASUS n-series. And Max6. :p</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167712</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167712</link>
					<pubDate>Sun, 17 Jun 2012 14:12:18 +0000</pubDate>
					<dc:creator>n00b_meister</dc:creator>

					<description>
						<![CDATA[
						<p>Load this onto your board:</p>
<p>//read all analog inputs on the Mega 2560;<br />
//check inputs using Serial Monitor;<br />
//then delete/paste some code to send output to MaxMSP</p>
<p>int touchVal;//sensor reading</p>
<p>void setup(){<br />
  Serial.begin(9600);<br />
}</p>
<p>void loop(){<br />
  //n00bs array<br />
  for(int x=0; x&lt;15; x++){<br />
  touchVal=analogRead(x);<br />
  //scale 0-1024 (10-bit) input to 0-c.200 (8-bit) output;<br />
  //depends entirely on the given circuit/current<br />
  touchVal/=5;<br />
  //////////////////////////////////////////////////////////<br />
  //replace all the following lines with those at the bottom<br />
  //when you are finished using Arduino serial monitor<br />
  //to check everything, and ready to send to Max:<br />
  Serial.print(x);//print &#8220;header&#8221; identifier, followed by&#8230;<br />
  Serial.print(&#8221;  =  &#8220;);<br />
  Serial.print(touchVal);//the sensor value<br />
  Serial.print(&#8221;   &#8220;);//i forget how to print a tab<br />
  }<br />
  Serial.println();<br />
  delay(50);<br />
}</p>
<p>/*<br />
void loop(){<br />
  Serial.write(x);//print &#8220;header&#8221; identifier, followed by&#8230;<br />
  Serial.write(touchVal);//the sensor value<br />
  }<br />
  delay(50);<br />
}<br />
*/</p>
<p>In Max all you need is:</p>
<p>[metro 20]</p>
<p>[serial c 9600] (port identifier will obviously differ)</p>
<p>[zl group 2]</p>
<p>[route 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]</p>
<p>Brendan</p>
<p>ps<br />
rarely, I may have to send these messages to the serial object:</p>
<p>1. close<br />
2. open port c</p>
<p>to get the stream to settle down, but only like once in 100 times.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167713</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167713</link>
					<pubDate>Sun, 17 Jun 2012 14:26:40 +0000</pubDate>
					<dc:creator>Steven Miller</dc:creator>

					<description>
						<![CDATA[
						<p>+1</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167714</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167714</link>
					<pubDate>Sun, 17 Jun 2012 16:23:49 +0000</pubDate>
					<dc:creator>edsonedge</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks NoobMeister  :)</p>
<p>Ill try  what you suggest later on</p>
<p>I will also give you a +1   (the analog pins are the only thing I use on my arduino) </p>
<p>All the best</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167715</guid>
					<title><![CDATA[Re: SensorBox  and more analog inputs with Arduino Mega]]></title>
					<link>http://cycling74.com/forums/topic/sensorbox-and-more-analog-inputs-with-arduino-mega/#post-167715</link>
					<pubDate>Mon, 18 Jun 2012 15:13:26 +0000</pubDate>
					<dc:creator>n00b_meister</dc:creator>

					<description>
						<![CDATA[
						<p>Hi<br />
As requested, I&#8217;ve posted a very short and simple (and silent) toot on my blog and youtube, demonstrating the code and patch I wrote to access all 16 analog pins of the Arduino in MaxMSP.</p>
<p>Haven&#8217;t got a decent soundcard yet for my brand spanking new rocket-ship ASUS, so apologies for the silent video.</p>
<p><a href="http://brendan-admi.blogspot.co.uk/" rel="nofollow">http://brendan-admi.blogspot.co.uk/</a></p>
<p><a href="https://www.youtube.com/user/ronnie9253?feature=mhee" rel="nofollow">https://www.youtube.com/user/ronnie9253?feature=mhee</a></p>
<p>Brendan</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

