I was lucky enough to take a Mechatronics class (software + electronics) in high school a couple of years ago (Australia, year 11). One (very talented) female chose to take the class along with probably 15 males, though physics & maths seemed about a 50/50 split.
That's an even worse percentage than the engineering faculty at my university, which at 23% has the highest ratio of women in engineering faculties nationally.