mindfulness vibrating bracelet with random time

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: mindfulness vibrating bracelet with random time

Post by adafruit_support_bill »

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.

User avatar
bozzaglia
 
Posts: 131
Joined: Mon Aug 01, 2022 6:14 am

Re: mindfulness vibrating bracelet with random time

Post by bozzaglia »

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....
Attachments
A6895847-BE14-4846-8044-4DA66A61BADF.jpeg
A6895847-BE14-4846-8044-4DA66A61BADF.jpeg (628.07 KiB) Viewed 257 times

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: mindfulness vibrating bracelet with random time

Post by adafruit_support_bill »

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

User avatar
bozzaglia
 
Posts: 131
Joined: Mon Aug 01, 2022 6:14 am

Re: mindfulness vibrating bracelet with random time

Post by bozzaglia »

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...
Attachments
E8935252-2528-4842-9C60-342189E69771.jpeg
E8935252-2528-4842-9C60-342189E69771.jpeg (48.59 KiB) Viewed 252 times

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: mindfulness vibrating bracelet with random time

Post by adafruit_support_bill »

It is possible that the tutorial was originally done with a different transistor. Some transistors have different pinout arrangements. I'll look into it.

User avatar
bozzaglia
 
Posts: 131
Joined: Mon Aug 01, 2022 6:14 am

Re: mindfulness vibrating bracelet with random time

Post by bozzaglia »

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?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: mindfulness vibrating bracelet with random time

Post by adafruit_support_bill »

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.

User avatar
bozzaglia
 
Posts: 131
Joined: Mon Aug 01, 2022 6:14 am

Re: mindfulness vibrating bracelet with random time

Post by bozzaglia »

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?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: mindfulness vibrating bracelet with random time

Post by adafruit_support_bill »

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.

User avatar
bozzaglia
 
Posts: 131
Joined: Mon Aug 01, 2022 6:14 am

Re: mindfulness vibrating bracelet with random time

Post by bozzaglia »

ok, that's what I thought!

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”