mindfulness vibrating bracelet with random time
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: mindfulness vibrating bracelet with random time
Good to hear the Gemma is working now. You will probably get better answers to your Python questions from the folks over at the CircuitPython forum.
- bozzaglia
- Posts: 131
- Joined: Mon Aug 01, 2022 6:14 am
Re: mindfulness vibrating bracelet with random time
Ok. One more question for you (sorry...) about the circuit... I’ve just trying to run both my code (random time vibration, which will definitely have a bunch of mistakes) and the original code from your “buzzing mindfulness bracelet” project (which should work!) and in both cases the motor never vibrates. However with your code the led is steady green, while with mine it is a green-yellow-flashing blue loop...
The plotter function on the My editor doesn’t show snitching happening...
I am wondering if I made some mistakes with the circuit or soldering components :-(
I am attaching a picture so maybe you can see if there is something evidently wrong. It should be the same of your project with the only addition of the pushbutton on D2....
The plotter function on the My editor doesn’t show snitching happening...
I am wondering if I made some mistakes with the circuit or soldering components :-(
I am attaching a picture so maybe you can see if there is something evidently wrong. It should be the same of your project with the only addition of the pushbutton on D2....
- Attachments
-
- A6895847-BE14-4846-8044-4DA66A61BADF.jpeg (628.07 KiB) Viewed 266 times
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: mindfulness vibrating bracelet with random time
Looks like you might have the transistor backwards. Not all transistors have the same pinouts. If you are using the PN2222 from the store, see the pinouts in the datasheet here: https://cdn-shop.adafruit.com/datasheets/PN2222A.pdf
- bozzaglia
- Posts: 131
- Joined: Mon Aug 01, 2022 6:14 am
Re: mindfulness vibrating bracelet with random time
Hmmm... I am using the 2222 and looking at the po out and the circuit description (collector to motor black wire) it looks like you are right and I have it backwards. So I’ll try to flip it around and see what happens. Any chance I have fried something by mounting it backwards?
Anyway I followed the pdf instructions (see picture attached) and here it seems I got it right... I guess...
Anyway I followed the pdf instructions (see picture attached) and here it seems I got it right... I guess...
- Attachments
-
- E8935252-2528-4842-9C60-342189E69771.jpeg (48.59 KiB) Viewed 261 times
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: mindfulness vibrating bracelet with random time
It is possible that the tutorial was originally done with a different transistor. Some transistors have different pinout arrangements. I'll look into it.
- bozzaglia
- Posts: 131
- Joined: Mon Aug 01, 2022 6:14 am
Re: mindfulness vibrating bracelet with random time
Ok with the swapped transistor YOUR code works!! Mine doesn’t, big surprise :-)
What does it mean that with your code loaded the led is solid green, while with mine it swings green-yellow-flashing blue?
What does it mean that with your code loaded the led is solid green, while with mine it swings green-yellow-flashing blue?
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: mindfulness vibrating bracelet with random time
The flashing sequence is designed to give some clues about where the problem is. But it varies a bit depending on the version you are running.
https://learn.adafruit.com/welcome-to-c ... er-2978455
Debugging Python is a bit outside my area of expertise. The CircuitPython forum is the place to ask.
https://learn.adafruit.com/welcome-to-c ... er-2978455
Debugging Python is a bit outside my area of expertise. The CircuitPython forum is the place to ask.
- bozzaglia
- Posts: 131
- Joined: Mon Aug 01, 2022 6:14 am
Re: mindfulness vibrating bracelet with random time
Ok I am getting some answers on the other forum. A doubt about my lipo battery which arrived today, can I have the Gemma recharge it when connected via USB or I need to unhook the battery and charge it separately every time?
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: mindfulness vibrating bracelet with random time
The Gemma does not have a charging circuit, so it will not charge the LiPo when plugged into USB. You will need a separate charger.
- bozzaglia
- Posts: 131
- Joined: Mon Aug 01, 2022 6:14 am
Re: mindfulness vibrating bracelet with random time
ok, that's what I thought!
Please be positive and constructive with your questions and comments.