It really doesn’t, I’m a Mac user too. A lot of the helpful tools are unavailable for MacOS as well.
I haven’t installed that yet, but I’ve really only had trouble with VSCode’s intellisence (I had to add mono to the $PATH or something IIRC).
It really doesn’t, I’m a Mac user too. A lot of the helpful tools are unavailable for MacOS as well.
I haven’t installed that yet, but I’ve really only had trouble with VSCode’s intellisence (I had to add mono to the $PATH or something IIRC).
I was able to develop some games on my Mac using the Arduino IDE back in 2019 with no problems really, it was pretty straightforward. I think the addition of the FX capability is throwing me off.
Looking at the example projects on the ArduboyFX library on GitHub has cleared up a few things up for me. But I’m still unsure about how all the data that will be stored on the FX chip gets combined into the single .hex file that gets uploaded to an Arduboy. @Mr.Blinky is there a Python script that does that? I’m trying to think of the best way to do this on a Mac, and it seems like that will have to avoid using the Arduboy FX Arduino plugin.
The fxdata will not be stored in the hex file. it’s a seperate file (fxdata.bin) that is uploaded seperately.
the fxdata is build using the fxdata-build.py script and then uploaded to Arduboy using the fxdata-upload.py script. These scripts are part of the Arduino plugin and the Arduboy-Python-Utilities
The arduino sketch is uploaded as usual.
I see, thanks. So when sharing a game that uses the FX chip it’s always necessary to share both the .hex file and the fxdata.bin file?
The .hex file is the file which stores the game itself, the .bin stores the fx data, so yes, it would be necessary (at least in theory, but all the examples which use the FX chip come “packaged” with the .bin)
Oh. Then I guess it’s the “packaged” part that’s confusing. Maybe I’m over complicating all this stuff.
By packaged, I meant “comes with.” Like, when you share a game, usually you would share the source files and the .hex; the .hex comes “packaged” with the source files. Sorry to confuse you.
Oh, okay. So you’re just saying that they’re put in the same folder, not that the fxdata.bin file is somehow contained within the .hex file.
Yeah, somewhere in the repository.
Yes.
They don’t neccesary need to be in the same folde but they usually are.
I’ve spent another hour tonight trying to do something as simple as running the fxdata-build.py script on my Mac. I have the necessary pyserial and pillow modules installed but when I open fxdata-build.py with the Python Launcher it says I need to install pyserial. That got too frustrating. And the Arduino FX plugin in the IDE keeps telling me that python3 isn’t installed. I don’t see any instructions about what files actually need to be put in those folders for python3, PIL and serial for Mac, or how to get the necessary files. Unfortunately this is all getting to the point where it’s just not worth the time. I know @filmote uses a Mac and has got this working, but he’s a much smarter guy than me!
Its a mess on the Mac. I actually uninstalled every version of Python on my machine - there were multiples - and reinstalled it all. I then reinstalled everything. Finally I copied the files from the system folder for PIL into a subdirectory of the Python tools and have this in my game directory - you can see this below:
I honestly cannot tell you what worked but it seems to work now.
I cannot get this to work either. It expects the Python to be in a subdirectory of the IDE not in a system folder. @Mr.Blinky pointed me to a ‘portable’ version of Python which I copied into that location but it still could not ‘find’ it. Mr.Blinky has a Mac at work and is going to have a look for me.
Python launcher? As far as I know, you run the scripts from your terminal. You probably already know this, but you cd to the directory of the file, and type python
or python3
or py
(it depends on which version you have installed) then the .py file.
what I know of OSX is that often there are multiple versions of python in terminal
try typing this in terminal:
python -V to view version
python -m site to list system path
and / or::
python3 -V
python3 -m site
One thing is sure. I’m more motivated now to pick up webSerial again
Yes, yes, yes, yes …
When I was first installing Python, I installed pretty much everything, every version. I re-installed everything a while later and currently I just have Python 3. The path for that is /Library/Frameworks/Python.framework/Versions/3.10/bin/python3
Thanks for the info and screenshot, that’s helpful. Where did you find the files that you have in the PIL and Pillow 9.3.0 folders? And is there also a folder for pyserial in there that I can’t see in the screenshot?
I have quite a few versions of Python installed now too, just from trying to get this all to work. My first goal is just to use a demo from Mr. Blinky’a GitHub and try to run these utilities to get it to create the fxdata files. I’ve spent probably three hours now and have made seemingly no progress. I’ll try again tomorrow.
You should be able to do:
pip3 show Pillow
Or simply pip to show details.
Okay, I’ve finally got this almost working using the helpful suggestions here. But I’ve come across something strange and I’m wondering if it’s specific to a Mac.
@Mr.Blinky When trying to build the fxdata.bin file in the hello-world example, I get the following traceback error:
Traceback (most recent call last):
File "[redacted path]/fxdata-build.py", line 236, in <module>
elif t == 7: bytes += part.encode('ANSI').decode('unicode_escape').encode('ANSI') + b'\x00'
^^^^^^^^^^^^^^^^^^^
LookupError: unknown encoding: ANSI
This error only shows up while the string helloWorld = "Hello World!"
line is in the fxdata.txt file. When I remove that line, it builds the fxdata.h and fxdata.bin without a problem. Is there an issue with trying to build those files with a string
present? Does this only happen on a Mac? My game idea would involve saving a lot of strings to the FX chip so I’m really curious about this.