As far as I know it’s not possible to program the Photon with anything besides C/C++.
There are implementations for JS and Python on other microcontroller (even C#) but not for the Photon.
That’s not entirely true… There is Viper, which let’s you program the Photon in python, although you currently lose the Particle Cloud functionalities, if I’m not mistaken.
What about language wrappers like Particle’s own SparkJS? Does SparkJS work on the Photon?
I’d suggest learning C/C++ since that will definitely benefit you in the future. With the amount of examples available for Arduino that shouldn’t be too hard.
but C is so hard!
The problem is fundamental differences in the languages themselves with the core sticking point being memory management.
Your best bet is write very minimal C code that simply exposes the data you want via Spark.variable and functions to run via Spark.function then have code running on a computer somewhere that uses the REST APIs to communicate with and control the Photon.
A quick search turned up projects like https://github.com/rwaldron/johnny-five which appear to take this approach to the extreme and they apparently might have some Spark/Photon support: https://github.com/firmata/spark
I might just get a Tessel 2 or a Espruino Pico. What do you think is better?
Oops, fixed that typo.
@MORA Now I understand your suggested architecture. I dunno, I guess I won’t judge @rpiswag, but if I were to judge, at this point this solution has crossed a line. The “program” for your microcontroller is really just spread across two machines and the cloud. I don’t know the project you have in mind, but perhaps just forget about a microcontroller and just use a more powerful computer, like an old laptop or something for whatever it is you are doing. Or maybe a raspberry pi.
The reason I want to use a microcontroller is because power is a big concern for my project.
What are you trying to do? If it isn’t overly complicated, we might be able to help you out.
I am trying to use a infrared receiver so that when the infrared receiver receives a signal it will send a wake on lan command to wake up my computer. I have a old computer running as a media center box.
Being good at something should not hold you back from learning something new
And if you start in small steps C is not hard at all - at least standard applications will be very doable.
The internet, the docs and this forum are full of information that can get you started, without needing to ask for everything.
Talking from own experience the main thing about programming is to learn to think like a programmer - the language or dialect is only secondary and usually not too much of an obstacle, if you really want to know.
That is a good point but it is nice to make your project in a language you are comfortable in. It is like trying to write a book in a foreign language. You can write that book in that foreign language but it will take you a lot longer than your native language and you will probably need a lot more help and you will probably make a lot more mistakes.