Author Topic: Anything to know when treating Makey Makey as standard Arduino?  (Read 15448 times)

Passiday

  • MaKey MaKer
  • Posts: 4
    • View Profile
Anything to know when treating Makey Makey as standard Arduino?
« on: October 29, 2012, 06:48:42 PM »
Hello,

So, I've got the board, played with my kids with it, etc. And I feel it's time to move on discovering new horizons. I'd like to push the limits and do some programming beyond what is explained here: http://www.sparkfun.com/tutorials/388

So I understand that Makey Makey is *like* the Arduino Leonardo, but not exactly. Perhaps I'm not about to move so aggressively, but let's assume for a moment that I don't care about the default proposed functionality of Makey Makey (ie, making any object a keyboard key) any more and want to use the board to drive a robot with 16 servos and several sensors. Is there anything to prevent me doing that? Ie, the status/sensitivity of input pins, etc?

It would be nice to see the list of things "important to know when treating Makey Makey board as standard Arduino".

Passiday

  • MaKey MaKer
  • Posts: 4
    • View Profile
Re: Anything to know when treating Makey Makey as standard Arduino?
« Reply #1 on: November 03, 2012, 06:08:49 PM »
Well, Ok,

This reply from wakeupsilver kind of answers this:
Quote
MaKey MaKey runs on top of Arduino. That means first we put the Arduino Leonardo bootloader on (ever so slightly modified to shut off the transmit LED). Then we put an Arduino sketch on top of the bootloader.

Ie, basically only small change in bootloader that really doesn't influence the IO functionality of the board.
But this confuses me:
Quote
As for making your own, sure you can. It will help to have our sketch, but in theory you can just make it with your own sketch. Just break out some 10M to 100M resistors (anywhere in that range, higher resistors give you more sensitive results, but more susceptible to noise as well). Put the resistors in a voltage divider with the (let's say you picked 22M) 22M pulling up to 5V, and the alligator clips going out to the world from the digital input pin and from ground. Then just bridge ground to the digital input pin (which is also connected to the 22M pulling up to 5V) through an everyday object, such as your body and a banana.

I don't understand why in one paragraph he says there's only change in bootloader (ie, no new hardware parts), but in another paragraph it is suggested to attach resistors. Puzzled.  ???

Passiday

  • MaKey MaKer
  • Posts: 4
    • View Profile
Re: Anything to know when treating Makey Makey as standard Arduino?
« Reply #2 on: November 09, 2012, 07:20:44 AM »
Ok, no response from the creators, so I went on to test the board by trial-error. Here are the results, and I will edit this post if someone or myself will discover something more.

Pin mappings
Notes: All pins are digital IN/OUT by default, the extra functions can be PWM and analog input. I haven't tested analog input yet, so no info on that yet. I also would expect to see 7 PWM pins instead of 5 (if this is Leonardo clone as they claim), but I have no idea where they are hiding. Strange pins are 9-11, from the official MM sketch one can see that they control the onboard LEDs in pretty strange way - combination of input/output modes and high/low values.
Pin IDOnboard locationFunction
0D0Digital IN/OUT
1D1Digital IN/OUT
2D2Digital IN/OUT
3D3Digital IN/OUT, PWM
4D4Digital IN/OUT
5D5Digital IN/OUT, PWM
6"Click" connectorDigital IN/OUT, PWM
7"Space" connectorDigital IN/OUT
8"Down" connectorDigital IN/OUT, PWM
9Control onboard LEDs?
10Control onboard LEDs?
11Control onboard LEDs?
12"Up" connectorDigital IN/OUT
13"Left" connectorDigital IN/OUT, PWM
14D14Digital IN/OUT
15"Right" connector / D15Digital IN/OUT
16D16Digital IN/OUT
17Onboard "Mouse" LED
18A0Digital IN/OUT
19A1Digital IN/OUT
20A2Digital IN/OUT
21A3Digital IN/OUT
22A4Digital IN/OUT
23A5Digital IN/OUT
« Last Edit: November 09, 2012, 07:28:40 AM by Passiday »

wakeupsilver

  • Administrator
  • MaKey MaKer
  • Posts: 40
    • View Profile
    • MaKey MaKey
Re: Anything to know when treating Makey Makey as standard Arduino?
« Reply #3 on: November 15, 2012, 07:47:30 PM »
Hi

The bootloader is the same as Arduino (only difference is that is waits 2 seconds instead of a longer time period before booting up).

The hardware setup is slightly different which you can see from the eagle schematic. Most notably
- Some pins are not available, but as you can see D0-D5 and A0-A5 are the most obviously available pins broken out to the side female headers.
- There are 22M pullups on all the input pins. This won't affect most projects, but for some sensitive projects it could cause a difference. If you would like to disconnect them, cut the trace labeled "pullups" on the back of the board. (WARNING: your board will not longer work normally as a makey makey if you do this). It shouldn't be necessary to cut this trace for the vast majority of projects.

Carlos Mononoke

  • MaKey MaKer
  • Posts: 3
    • View Profile
Re: Anything to know when treating Makey Makey as standard Arduino?
« Reply #4 on: November 27, 2012, 03:55:21 PM »
Hi, I have just recieved today my makey makey, I am used with arduino, well i think that i can use 2 pins like out put in MM board no??? D14 and D16 but if i need more output how can i use then,and if  i want to use analog intput can I??

thanks!!!!

star

  • Administrator
  • MaKey MaKer
  • Posts: 25
    • View Profile
Re: Anything to know when treating Makey Makey as standard Arduino?
« Reply #5 on: November 28, 2012, 02:01:40 PM »
Hey Carlos!  You can use D0-D5 as extra digital communication (red rectangle).  The pins labeled A0-5 are analog inputs (green rectangle).

Passiday seems to have posted the rest of the pin mappings above.  Hope this helps!

*



Carlos Mononoke

  • MaKey MaKer
  • Posts: 3
    • View Profile
Re: Anything to know when treating Makey Makey as standard Arduino?
« Reply #6 on: November 29, 2012, 04:23:46 AM »
Hi star,
I´ve seen this information in sparkfunt guide, and I have open in arduino IDE the file fron sparkfun.

But i didn´t understand  the code yet, becouse:

Quote
#define NUM_INPUTS       18    // 6 on the front + 12 on the back

so all is a input can I define some of then like output or every input have a big resistor attached (hardware) and if you want to use one of then like output you need to destroy a little bit the PCB???
and another thing that I need to understand is, if I can use some of them like output,where in the loop function can I include my action function??? (something like blinking led) and where goes the input read value???(when i touch the apple, I think that is like press a buttom, so somewhere in the  the programm have done readDigital(); or something similar)

Well if someone can help THANKS!!!! I will try to understand too and came back with some result

star

  • Administrator
  • MaKey MaKer
  • Posts: 25
    • View Profile
Re: Anything to know when treating Makey Makey as standard Arduino?
« Reply #7 on: December 10, 2012, 08:16:35 PM »
Hey Carlos!

You can definitely use the inputs like outputs if you change the definition to output in software.

You can bypass the resistors by making a conductive connection across them (they are the little blocks soldered right at the header).

As for where to put your functions, try this guide to Arduino Programming: http://playground.arduino.cc/uploads/Main/arduino_notebook_v1-1.pdf