That's new to me....
Neat!
Search found 1735 matches
- Mon Apr 13, 2026 9:27 am
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 11
- Views: 277
- Sun Apr 12, 2026 5:20 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 11
- Views: 277
Re: ToBinary string manipulation
I moved this into a small component (I called it NumberUtilities - maybe more routines to come?) The source is still called ToBinary :-) I added a Value and ToString macros that take either a string and a base or a value and a base. Base can be from 2 (binary) up to 16 (hex) - although could be exte...
- Sat Apr 11, 2026 8:26 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 11
- Views: 277
Re: ToBinary string manipulation
Hi Bob, Looks like a neat solution - reduces transmission time by 50%. It's a good optimisation. I'll have a play at putting it into a component - if you don't use a function the compiler will optimise it away (at least when it's compiled, I'm not sure what the situation with web apps is) - or as an...
- Sat Apr 11, 2026 6:00 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 11
- Views: 277
Re: ToBinary string manipulation
I added a binary string (in the form "101010101" with upto 32 characters) to value function too. In simulation I've added the various variables to the viewer so that you can compare them (ie check they are correct :-) ) Note that it doesn't check the validity of the string (so "10ABC&...
- Sat Apr 11, 2026 5:17 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 11
- Views: 277
Re: ToBinary string manipulation
Pseudocode is just a way to describe an algorithm. Although FC can display code as (a) pseudocode too. I converted ToBinary to FC - and tested in s8imulation. Here I just pass constants to the macro - although variables could also be used as the arguments. If we added a BinaryToValue - that takes a ...
- Sat Apr 11, 2026 1:38 pm
- Forum: Feature Requests
- Topic: ToBinary string manipulation
- Replies: 11
- Views: 277
Re: ToBinary string manipulation
Adding a ToBinary function is an interesting programming exercise: In effect you need (in pseudocode here): ToBinary(long unsigned x, byte digits) return string// Take a number (up to 32 bits) and convert to a string locals byte i = 0, string res[33] loop while .i < .digits res[.i] = ((.x & (1 <...
- Thu Apr 09, 2026 1:43 pm
- Forum: Feature Requests
- Topic: Web app spinner
- Replies: 6
- Views: 283
- Thu Apr 09, 2026 10:08 am
- Forum: Feature Requests
- Topic: Web app spinner
- Replies: 6
- Views: 283
Re: Web app spinner
The 7-segment display is fairly easy to implement too - if you can write the data to the display register. Just need to calculate a 'character set' (for example for a rotating star) and then output at intervals. For real fireworks - there is the 16 segment display :-) (Though the one I did didn't wo...
- Wed Apr 08, 2026 9:23 pm
- Forum: General
- Topic: EB-006 drivers
- Replies: 3
- Views: 423
Re: EB-006 drivers
Have you tried Zadig (with libusb-win32)
It's available from https://zadig.akeo.ie/
I've used it several times in the past - and it seems safe and reliable.. Usual provisos apply though.
Martin
It's available from https://zadig.akeo.ie/
I've used it several times in the past - and it seems safe and reliable.. Usual provisos apply though.
Martin
- Wed Apr 08, 2026 8:51 am
- Forum: General
- Topic: Parity bit
- Replies: 4
- Views: 289
Re: Parity bit
Rather than using an if .... statement to calculate the parity bit (and brackets might change the result here if (.x == 1) || (.x == 3) etc (you have if x==1 && x= 3 && x=5... which can't ever be true) Depending on whether you need odd or even parity: Use .parity = .x & 1 Returns...