Search found 98 matches

by fredbox
Sat Feb 17, 2018 4:17 am
Forum: STM32F103 Boards
Topic: Reading Analog Voltage on STM32F103C8T6
Replies: 7
Views: 322

Re: Reading Analog Voltage on STM32F103C8T6

You can also use the map() function to scale an a/d input. Based on the 33k/10k voltage divider, the maximum count of 4095 occurs around 14.19V. Serial.println(map(adcin, 0, 4095, 0, 14190)); scales the value without the decimal point. Pito's version uses floating point and shows the decimal point c...
by fredbox
Sun Feb 11, 2018 5:31 pm
Forum: General discussion
Topic: Timer "One-Pulse" mode
Replies: 14
Views: 314

Re: Timer "One-Pulse" mode

I think you triggers the load "on" at zero crossing, and at specific time you switch off the load (with the pulse). For a triac, it's the other way around. The triac turns off at zero crossing and needs another trigger after some time delay to set the phase angle. A new trigger is needed for each h...
by fredbox
Tue Dec 19, 2017 9:47 pm
Forum: General discussion
Topic: RFM69HW demo application for blue pill?
Replies: 31
Views: 706

Re: RFM69HW demo application for blue pill?

Each folder will have only one .ino file that is your main application. Additional tabs will be .cpp and .h files. You can choose to create custom libraries if you want, but for many projects they add unnecessary complexity. If you do use 3rd party libraries, it is suggested that you copy the librar...
by fredbox
Mon Sep 11, 2017 4:04 pm
Forum: General discussion
Topic: [POLL (Open)] Blocking behaviour of Serial.USB during TX
Replies: 21
Views: 1335

Re: [POLL (Open)] Blocking behaviour of Serial.USB during TX

-If USB is disconnected, just drop and return with no timeout, and not saving to buffer either. Return indicates 0 bytes were sent. This is how Arduino DUE works.
+1
by fredbox
Thu Aug 17, 2017 3:06 pm
Forum: Off topic
Topic: Aliexpress delivery times
Replies: 12
Views: 630

Re: Aliexpress delivery times

Prior to joining this forum, I had never ordered anything from AliExpress. Since June of last year, I have ordered from about 70 different sellers. Every item has been delivered. Only a couple were after the promised delivery date. In one case, the seller issued a small refund that I didn't request....
by fredbox
Wed Aug 02, 2017 5:24 pm
Forum: STM32F103 Boards
Topic: Black STM32F103 board from aliexpress with different pcb layout
Replies: 15
Views: 1108

Re: Black STM32F103 board from aliexpress with different pcb layout

If the bootloader is running, you should see the led blinking. Did you remember to move the jumper on Boot0 back to 0? Boot0 and Boot1 should both be 0 to use the bootloader.
by fredbox
Wed Aug 02, 2017 4:12 pm
Forum: STM32F103 Boards
Topic: Black STM32F103 board from aliexpress with different pcb layout
Replies: 15
Views: 1108

Re: Black STM32F103 board from aliexpress with different pcb layout

You may need a different USB serial adapter. My CH340 board was getting similar errors, but the CP2102 I have found and flashed it the first time. Make sure Boot0=1 and Boot1=0 before you try to upload the bootloader. There was/is an issue with some serial drivers not supporting parity. The Black Pi...
by fredbox
Sat Jul 22, 2017 5:01 pm
Forum: Builds and Announcements
Topic: Combined bootloader and sketch
Replies: 7
Views: 672

Re: Combined bootloader and sketch

Change line 18 to

Code: Select all

printf("\nUsage. %s bootloader.bin sketch.bin output.bin - Incorrect number of args\n\n", argv[0]);

$ ./main

Usage. ./main bootloader.bin sketch.bin output.bin - Incorrect number of args
That will allow usage to use the name of the executable program.
by fredbox
Sat Jul 22, 2017 2:45 pm
Forum: Builds and Announcements
Topic: Combined bootloader and sketch
Replies: 7
Views: 672

Re: Combined bootloader and sketch

The code compiles with no changes on Linux. For Windows, you can use tcc if Visual Studio is not installed. I use that quite a lot for Windows exe files. Linux: $ make main cc main.c -o main $ ls -la main* -rwxr-xr-x 1 fred fred 8930 Jul 22 09:12 main -rw-r--r-- 1 fred fred 2136 Jul 22 09:11 main.c ...