I'm coding some example in micropython for the BBC Micro::bit. I'm using the Mu editor, which checks the code and flashes it to the board.
The thing is, I can't find a way to import my own scripts from the main one. Despite the code check ends succesfully (and works on my computer), once flashed, the board will complain about the imported module not existing. It's like only the main script is making it into the board. Furthermore, if I paste all my code into one script, Mu will complain about the script being too long (about 300 lines). What am I doing wrong here? Why is there a max script length?
The reason there is a maximum script length is because of the limited about of memory inside the micro:bit. It is a very capable "little computer", but it has a few limitation, memory being one of the more prominent ones.
When you click on the Flash button on Mu it only copies over the current script. You could use the new storage functionality from MicroPython (link to documentation explaining the feature), which will need the latest version of Mu (http://codewith.mu). You have to keep in mind that flashing a new script will always remove whatever is stored, so you would have to first flash your main script, and then add the other file by clicking on the "files" button on Mu. There you can drag and drop any script from your local Mu folder into the micro:bit.
The absolute simplest way to do what you want would be to combine everything into a single file, as you have tried before. If it doesn't fit you could try reducing the size of the script, for instance by reducing your comments or somehow reducing the amount of code.