Search found 57 matches

by sigi
Sun Oct 08, 2023 11:36 pm
Forum: General discussion
Topic: Timer number from pin
Replies: 8
Views: 3569

Re: Timer number from pin

final solution...

#include <HardwareTimer.h>

#define pin PA1
#define PinTimer(pin) (PIN_MAP[pin].timer_device->clk_id-RCC_TIMER1+1)
#define PinChannel(pin) (PIN_MAP[pin].timer_channel)

void setup() {
delay(1900);
Serial.print("Pin ");
Serial.print(pin);
Serial.print(" Timer ");
Serial.print ...
by sigi
Sat Oct 07, 2023 3:51 pm
Forum: General discussion
Topic: Tone library with no delay
Replies: 2
Views: 2582

Re: Tone library with no delay

well I already solve my problem... Attachment with the library if anybody want to try it:
https://github.com/sigifre/Buzzer-Stm32-No-delay
by sigi
Fri Oct 06, 2023 1:41 pm
Forum: General discussion
Topic: Tone library with no delay
Replies: 2
Views: 2582

Tone library with no delay

Hi
I made this sketch to sound a melody on a pin using a timer and an array of frequencies and periods...

HardwareTimer Timer(4);
uint8_t Pin = PB9;
bool Enabled;

long lastStart;
long Freq;
long lastFreq;
long lastConfig;
int lastCounter;
long Dura;
int counter;

uint32_t DutyCyc;
uint32_t ...
by sigi
Thu Oct 05, 2023 2:13 pm
Forum: General discussion
Topic: SSD1309 on STM32F103 Roger Core
Replies: 0
Views: 18570

SSD1309 on STM32F103 Roger Core

HI
I have these SSD1309 2.42 I2C OLED and it seems it is not compatible with the SSD1306 code available... did somebody knows how it can work ?

https://ae01.alicdn.com/kf/A6c2ca5637e5c47dba415ad310532cd30V.jpg
https://www.aliexpress.com/item/32950307344.html?spm=a2g0o.detail.0.0.6ce25c38Gch3ci ...
by sigi
Thu Oct 05, 2023 1:35 pm
Forum: General discussion
Topic: Genuine stm32f103c8t6 blue pill sources
Replies: 3
Views: 4820

Re: Genuine stm32f103c8t6 blue pill sources

see this ones from WeAct ...
https://www.aliexpress.com/item/1005005567553337.html?spm=a2g0o.order_list.order_list_main.32.6ee01802HXmjXI
https://ae01.alicdn.com/kf/Sbf4c00d557964776aad1c5ed7ba99141u/WeAct-STM32F103C8T6-STM32F103CBT6-STM32F103-STM32F1-Bluepill-Plus-ARM-STM32-Minimum-System ...
by sigi
Sat Sep 30, 2023 4:35 am
Forum: General discussion
Topic: Timer number from pin
Replies: 8
Views: 3569

Re: Timer number from pin

I just use stm32f103 series

So there is no way to obtain the timer number from a particular pin?
by sigi
Fri Sep 29, 2023 5:42 am
Forum: General discussion
Topic: Timer number from pin
Replies: 8
Views: 3569

Re: Timer number from pin

thanks from Costa Rica... I will try to move to that core...
by sigi
Fri Sep 29, 2023 5:23 am
Forum: General discussion
Topic: Timer number from pin
Replies: 8
Views: 3569

Re: Timer number from pin

thanks but I'm not using that core...
I use "Arduino_STM32-master" obtained here : https://github.com/rogerclarkmelbourne/Arduino_STM32

the code u send me does not work using that core.
by sigi
Thu Sep 28, 2023 9:58 pm
Forum: General discussion
Topic: Timer number from pin
Replies: 8
Views: 3569

Timer number from pin

HI

there is any way to obtain the timer number from the pin name on a STM32F103 generic board?
I mean using PA8 to obtain 1 as an integer (timer 1)...

I want to create a HardwareTimer object starting from the desired pin number, using TIMER = new HardwareTimer(TimNum);
so I need a way to obtain ...
by sigi
Mon Apr 10, 2023 2:02 pm
Forum: General discussion
Topic: Rotary encoder with blue pill
Replies: 31
Views: 77049

Re: Rotary encoder with blue pill

@ rsonnicksen

when u do not want to use 2 bluepills in the same project because u need more timers, pins etc u need a bigger compatible bluepill ! (in the case u wanted in that way)

look for a STM32F103Z, "Z", or R, T V... they have more pins and/or memory and are 100% compatible with the normal ...

Go to advanced search