๐ŸŽ„โ›„โ„๏ธ๐ŸŽ It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! ๐ŸŽ„โ›„โ„๏ธ๐ŸŽ
0

total newbeginner having trouble with gemma MO
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

total newbeginner having trouble with gemma MO

by 7g7g7g on Fri Jun 07, 2019 2:56 pm

Hello,
this is my very first time doing this kind of thing. I landed on Gemma wanting to try wearable electronics. I come from crafting, this is my first step into tech. or rather, the combination thereof.

So, I have Gemma MO here and I have downloaded the arduino development environment and the libraries from adafruit.
I wanted to use the blink sketch provided by adafruit here: https://learn.adafruit.com/adafruit-gem ... rduino-ide

And nothing worked at all. And after a long time talking to a friend that I am so lucky to have he found the mistake:
why it is pin13 when gemma doesn`t have a pin13?

Then he helped me digging and we found this page:
https://learn.adafruit.com/adafruit-gem ... ches-to-m0

Which is where I am told to declare pins like this: pinMode(pin, INPUT_PULLUP)

So now my LED blinks. Yay.

But this is my very first project. And I thought I had understood that blinking a LED is an output, as opposed to reading a sensor which is input.
So why do you declare an output pin by calling it input?
I am very confused.

And how do I adress the Gemma pins as I go? I am a newbeginner and I watch youtube tutorials and read on the internet to learn this. Everything is for arduino and not for gemma that has different pins (holes). And even adafruits own gemma description includes a pin 13 when there is none. I don`t know how to adapt what I learn about arduino to the holes of Gemma.

It would be awesome to get information exactly for gemma. Because unless you already are advanced it is not intuitive.
Thank you.

7g7g7g
 
Posts: 5
Joined: Fri Jun 07, 2019 2:46 pm

Re: total newbeginner having trouble with gemma MO

by adafruit_support_carter on Fri Jun 07, 2019 3:43 pm

The LED is attached to pin 13, but that pin is not may available anywhere else. So you won't see any labels that say 13.

So the blink sketch should have worked per the guide. And it's weird how the other thing made it work. Not sure why it would.

Let's make sure you have a Gemma M0. Does it look like this on the back?
https://cdn-shop.adafruit.com/1200x900/3501-01.jpg

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: total newbeginner having trouble with gemma MO

by 7g7g7g on Fri Jun 07, 2019 3:51 pm

hello,
yes, M0.

I didn`t specify (cause I didn`t understand) that the LED that did blink was one that I had attached with alligator clips. Not the neopixel on the Gemma itself. Meanwhile we found out that pin 13 refers to that neopixel onboard and we are trying to make that blink- so far no success.

It is still not intuitive. I decided for arduino as opposed to circuit python because arduino has this vast amount of resources online. Circuit python is far less known. As a beginner I wanted to use the one that offers me most resources for free to learn.
But everything is for the arduino uno and I still do not understand how gemmas holes become the pins I learn about when reading about the arduino.

I am so lucky to have this friend a bit more advanced... we are searching description of library function calls, where would we find that?

7g7g7g
 
Posts: 5
Joined: Fri Jun 07, 2019 2:46 pm

Re: total newbeginner having trouble with gemma MO

by adafruit_support_carter on Fri Jun 07, 2019 4:00 pm

There are two LEDs on the Gemma M0. There's a tiny red LED marked "L" that is tied to pin 13. There's also an RGB DotStar that is tied to pin 3.
https://learn.adafruit.com/adafruit-gem ... uided-tour

They are very different LEDs with the DotStar requiring a special library.

If you run the blink test as is, the little red LED does not blink?
https://learn.adafruit.com/adafruit-gem ... blink-6-21

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: total newbeginner having trouble with gemma MO

by 7g7g7g on Fri Jun 07, 2019 5:40 pm

hahaha. ok, thank you.
things make a lot more sense now, even if not fully.

so, turns out the blink sketch did what it should all along. I thought it was the dotstar, and wondered why the red L blinked. Like, is this an error of kind? Nope, thank you for telling me, the sketch did what it should.

I still don`t understand what gemma hole is the equivalent to what thingy pin on the arduino?

but I got an external led with alligator clips to blink as I want having it on D0 and calling it pinMode (0, Output), which again makes sense cause it is output. Don`t know how the input_pullup worked when we tried, but it did work.

thanks again.

Not so easy to get into this, is it.

7g7g7g
 
Posts: 5
Joined: Fri Jun 07, 2019 2:46 pm

Re: total newbeginner having trouble with gemma MO

by adafruit_support_carter on Fri Jun 07, 2019 5:56 pm

You're progressing nicely! Just wanted to make sure the basic blink sketch was actually working. If it wasn't, we'd have looked into it. But it sounds like everything is generally working. So now try working through various guides, like the one linked above that gives a general overview of the Gemma M0:
https://learn.adafruit.com/adafruit-gemma-m0

In terms of programming, with the Gemma M0 you also have the option to use CircuitPython. The guide covers that.

But go with whatever seems easiest for you.

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: total newbeginner having trouble with gemma MO

by 7g7g7g on Fri Jun 07, 2019 6:05 pm

you know, as a total newbeginner I didn`t have any opinion whatsoever what I would be learning, circuit python or arduino, either would be fine by me. Just any means of making this thingy do what I want is fine by me.
I decided for Arduino based on the sheer quantity of projects including code and resources and youtube tutorial videos, all of which is available for free.
I didn`t find nearly as much for circuit python.
Quantity helps me, I am totally totally new to this. Like, until shortly I didn`t know what is binary. So if I don`t understand the phrasing of one explanation I can shop around until I find a phrasing that explains it so that I get it. I can watch a short youtube tutorial of 3 minutes explaining PWM very superficially and maybe in that moment it is enough cause it is just a sidenote somewhere else. Or I can chose a youtube tutorial that talks 30 minutes in depth about it. And in another context that is perfect cause I really need to know it this time. Just as an example. The principle PWM would probably the same in either language, but it would be the same case for something language related. And what I want to do has probably been done a gazillion times before so I can look at other peoples code and see how they did it.

So Arduino it is. Quantity won me over.

Thanks again, I hope I don`t need to bother this forum too much.

7g7g7g
 
Posts: 5
Joined: Fri Jun 07, 2019 2:46 pm

Please be positive and constructive with your questions and comments.