Search found 1525 matches

by mnfisher
Thu Oct 30, 2025 11:04 pm
Forum: General
Topic: MSB-LSB Bit swop not working with ESP32 Compiler
Replies: 2
Views: 115

Re: MSB-LSB Bit swop not working with ESP32 Compiler

There are some interesting algorithms: Depending on how often you need to reverse the bits of a byte 0 - the quickest technique is probably a lookup table rev[256] Where : rev[0] = 0 rev[1] = 0x80 rev[2] = 0x40 etc Then to reverse a byte rev_byte = rev[byte]. See also Hacker's Delight (Henry S Warre...
by mnfisher
Tue Oct 28, 2025 10:54 am
Forum: General
Topic: Buzzer tones.
Replies: 7
Views: 514

Re: Buzzer tones.

The buzzer component only turns a pin on (or off) to play a tone - which is a feature of the buzzer hardware.... The frequency value is only for simulation. It might be possible to alter the tone using PWM either with the buzzer device or by outputting directly (via a transistor or amplifier) to a s...
by mnfisher
Fri Oct 24, 2025 10:02 pm
Forum: General
Topic: ESP32 how to read the MAC Adress
Replies: 6
Views: 843

Re: ESP32 how to read the MAC Adress

I can't replicate the issue (I think you've mentioned it before) - I tried PuTTY and idf.py - p COM6 -b 115200 monitor - and both work as expected with / without the interrupt. Which terminal program are you using? There is definitely some repeated data that is 'correct' (A0:B7:) - but then everythi...
by mnfisher
Fri Oct 24, 2025 2:16 pm
Forum: General
Topic: ESP32 how to read the MAC Adress
Replies: 6
Views: 843

Re: ESP32 how to read the MAC Adress

Hi Stefan,

Default string size is 20 - and if somewhere there is a 'make a copy' box checked that might explain things? Passing strings by reference (not copying them) is usually the preferred option - and quicker too - but the default seems to be to pass by value.

Martin
by mnfisher
Thu Oct 23, 2025 9:02 pm
Forum: General
Topic: ESP32 how to read the MAC Adress
Replies: 6
Views: 843

Re: ESP32 how to read the MAC Adress

The read should work AOK - I tested on a esp32-wrooom - and the result looks okay....

This just outputs the MAC to UART..

Martin
by mnfisher
Mon Oct 20, 2025 9:54 pm
Forum: Projects - Embedded
Topic: Fun with Flowcode - v11 - Hash Functions
Replies: 0
Views: 615

Fun with Flowcode - v11 - Hash Functions

First up - I'd like to congratulate the Matrix team on the release of v11. There are lots of great new features to try - they have worked very hard - so I hope they are all off to the pub tonight for a well earned pint! I'd also like to be the first to offer a v11 specific project (but it's only sli...
by mnfisher
Thu Oct 16, 2025 2:26 pm
Forum: General
Topic: I'm looking for a way to convert a hexadecimal string to a ULONG variable.
Replies: 4
Views: 2835

Re: I'm looking for a way to convert a hexadecimal string to a ULONG variable.

As an alternative method -take a look at 'hash functions/values' - this is a common technique to assign a (not necessarily but usually) unique value to a string.

See https://en.wikipedia.org/wiki/Hash_function

For some interesting ideas :-)

Martin
by mnfisher
Wed Oct 15, 2025 12:32 pm
Forum: General
Topic: I'm looking for a way to convert a hexadecimal string to a ULONG variable.
Replies: 4
Views: 2835

Re: I'm looking for a way to convert a hexadecimal string to a ULONG variable.

12 digits won't fit in a 32 bit variable - which could hold 8 hex digits (4bits per digit)

You could convert to 3 x 16bit (unsigned int)

Martin

Ben beat me to it 🙄
by mnfisher
Sat Oct 11, 2025 10:47 am
Forum: General
Topic: Loop While!
Replies: 25
Views: 7126

Re: Loop While!

Is the signal being read correctly - you are just reading a pin for RemoteUp, EndStopUp etc - check that you are getting 0 or 1...

|| and && do work correctly for OR and AND ...

Martin
by mnfisher
Fri Oct 10, 2025 8:33 pm
Forum: General
Topic: Loop While!
Replies: 25
Views: 7126

Re: Loop While!

Hi Jorgen, I'd recommend some parenthesis around the parts of the OR So if (A = 1) || (B = 1).... Alternatively - as A and B are 0 or 1 (RemoteUp and EndStop!) - declare them as boolean (true = 1 and false = 0) and then just if A || B ... (Use || for OR and && for AND - though bitwise OR sho...