Search found 7686 matches

by RogerClark
Sun Feb 11, 2018 3:03 am
Forum: General discussion
Topic: Timer "One-Pulse" mode
Replies: 14
Views: 302

Re: Timer "One-Pulse" mode

Steve I got it working #include <Streaming.h> uint16_t pulseDelay = 3000; uint16_t pulseWidth = 100; void setup() { pinMode(PA1, PWM); // setup PA1 (Timer2 channel 2) to PWM (one pulse mode) pinMode(PA0, INPUT); // setup PA0 (Timer 2 channel 1) as input (capture input mode) Timer2.pause(); // stop t...
by RogerClark
Sun Feb 11, 2018 3:03 am
Forum: General discussion
Topic: Timer "Input Capture" ?
Replies: 37
Views: 2177

Re: Timer "Input Capture" ?

Thanks

I'll look at that other code
by RogerClark
Sun Feb 11, 2018 3:02 am
Forum: Off topic
Topic: i2c device not visible
Replies: 10
Views: 175

Re: i2c device not visible

Its possible that you'll need to comment out the include for the other I2C lib, as its constructor may interfere with the operation
by RogerClark
Sun Feb 11, 2018 3:00 am
Forum: General discussion
Topic: AC Dimmer
Replies: 51
Views: 1026

Re: AC Dimmer

@dannyf Re: On / Off or PWM vs dimming I think it probably depends on how the electricity company measures the power you are consuming or exporting. I'm actually building this for a fairly small scale water heater (1kW or 2kW), though it may get used for larger things The existing system uses a rela...
by RogerClark
Sat Feb 10, 2018 11:30 pm
Forum: General discussion
Topic: Timer "One-Pulse" mode
Replies: 14
Views: 302

Re: Timer "One-Pulse" mode

Steve BTW. I see what you mean about not setting up the mode at all TIMER2_BASE->CR1 = ( TIMER_CR1_OPM ); // one pulse mode The instructions to do that were in a completely different paragraph in the manual Also. I see that you were using the Timer3 output on PA6 I'll change my hardware and try that
by RogerClark
Sat Feb 10, 2018 11:12 pm
Forum: General discussion
Topic: Timer "One-Pulse" mode
Replies: 14
Views: 302

Re: Timer "One-Pulse" mode

Steve I've tried the code but its not doing what it should be :-( On the rising edge of PA0, PA1 toggles state I tried changing the setCompare and the setOverflow but it didn't make any difference I think this is closer to what its supposed to be doing, but it doesnt seem to be quite working yet ;-)
by RogerClark
Sat Feb 10, 2018 10:54 pm
Forum: Projects
Topic: F405 & F411 versions of the BluePill
Replies: 769
Views: 15569

Re: F405 & F411 versions of the BluePill

Steve

I think Victor added SIO recently.

But here are many things missing from the F4 version of the LibMaple F4 (Arduino_STM32)

BTW.

I agree... Just use STLink to upload.
by RogerClark
Sat Feb 10, 2018 10:52 pm
Forum: General discussion
Topic: Timer "Input Capture" ?
Replies: 37
Views: 2177

Re: Timer "Input Capture" ?

Steve I just used the code provided by @Cesco But I now see that it has problems I think the config is wrong. The counter seems to free run and the ISR gets called when the input pin changes. Looking at the original code (from Leaflabs) they thought that there would be a pinMode() for INPUT_CAPTURE,...
by RogerClark
Sat Feb 10, 2018 10:46 pm
Forum: Off topic
Topic: i2c device not visible
Replies: 10
Views: 175

Re: i2c device not visible

There have been some reports not being able to operate different I2C device libraries on the same bus. I don't think anyone has determined if these is a problem with specific libraries or whether all libraries are effected (due to problems with the Hardware I2C library) You could try using the versi...
by RogerClark
Sat Feb 10, 2018 10:16 pm
Forum: Projects
Topic: F405 & F411 versions of the BluePill
Replies: 769
Views: 15569

Re: F405 & F411 versions of the BluePill

The F405 has an internal USB bootloader, but it only supports DFUSe which is STMs extension to DFU. Also, it needs a different windows driver ( I forget which one), which needs to be installed by Zadig.. There is a separate thread about the F4 bootloader, but I can’t find it at the moment. In that t...