Mozzi & official Arduino Robot

68 views
Skip to first unread message

Jason Nolan

unread,
Mar 1, 2015, 9:56:32 AM3/1/15
to mozzi...@googlegroups.com
Hello Everyone;

I'm new to just about everything, but, I've been able to get the Official Arduino Robot running (https://github.com/jasonnolan/SonicRobot) with lots of help from someone (http://fabcirablog.weebly.com/blog/archives/12-2013) who unpacked all the insane pins on the robot that don't correspond to anything in any other arduino. I've had no problem getting a couple of Mozzi circuits running. My LONG TERM goal is  to take the sensor data from the SonicRobot and us Mozzi to generate interesting sounds as it moves around the space it is in.

My first step is where I have questions. I'd like to figure out, as a simple example, how to get the Mozzi Theremin (http://sensorium.github.io/Mozzi/doc/html/02_8_control_2_control__echo__theremin_2_control__echo__theremin_8ino-example.html) to run on the robot board. 

This means I have to figure out what pins I can use and then get the code to agree. Input pin's pretty easy. I can use TK2 (aka M1) on the robot and define it. 
Mozzi: #define INPUT_PIN 0 // analog control input
Robot: #define INPUT_PIN TK2 // analog control input

Audio out SHOULD be PWM~9, and I'm trying to figure out where that might be on the board, but I doubt anyone can help me in that regard, but if you can, GREAT!

Here's where I'm stuck. In Mozzi we have a "NUM_ANALOG_INPUTS" element:

Arduino/libraries/Mozzi/mozzi_analog.cpp: In function 'void adcDisconnectAllDigitalIns()':
/Users/jason/Documents/Arduino/libraries/Mozzi/mozzi_analog.cpp:85:24: error: 'NUM_ANALOG_INPUTS' was not declared in this scope
  for (uint8_t i = 0; i<NUM_ANALOG_INPUTS; i++){
                        ^

And I can't figure out, being the noob that I am, how I might poke at that so it might be more compliant to the Robot board vs the Uno. I will also have to look backwards from the Robot end, but if anyone could help me at the Mozzi end, perhaps we can meet in the middle?

I know I should give up on the robot and build one from scratch based on the Uno, but I got the robots in the lab and would love to make them work.

Thanks, in advance, for any thoughts, condolences, etc.

Jason

Tim Barrass

unread,
Mar 1, 2015, 5:42:39 PM3/1/15
to mozzi...@googlegroups.com
Hi Jason,
NUM_ANALOG_INPUTS is from somewhere in the Arduino source code - if you know how many inputs your board has, or even just the highest numbered one you want to use, you can define NUM_ANALOG_INPUTS yourself, probably in mozzi_analog.h.

Condolences,
Tim

--
You received this message because you are subscribed to the Google Groups "Mozzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozzi-users...@googlegroups.com.
To post to this group, send email to mozzi...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mozzi-users/64db21f6-d3fd-4f37-8ed4-324220fb2f94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages