Hey everyone. So i think its times i start working on my sparkcore some more. Right now i have one that sits on a shelf controlling a 5m led strip.
My partner suffers from epilepsy so having dimming lights was something i really needed, i had an arduino before but spark was sooo much easier.
So right now i have my spark sending out basic pwm signals, these get lifted up to 5v in order to control a 12v fet. (I need to build a new power board i think)
With that said right now i have an android control app on my phone to adjust brightness settings, turn the leds on and off, and give me a light sensor reading. Basic stuff i know. But my partner is too lazy to use it, and often turns off the usual light switch instead of messing about getting out a phone.
So i thought, why not take advantage of the new spark subscribe feature, or even some I2C communication and mount a small touchscreen to my wall to act as a light switch. Overkill i know.
The core controlling my lights is around a meter away from where i want the light switch to go. So i had a few questions to ask as i am very new to spark still (the only library ive used is the real time clock)
What i plan to do is use a second spark core to check for motion, or the touchscreen being pressed to trigger my lights. I understand the methods needed for the cores to talk but i need some advice.
I have never used I2C but it looks very useful. But i believe it has signal length limits? So would you
A) use the current spark and connect an I2C touchscreen to it and get that to check if its been touched? Maybe getting x and y positions?
B) Use a second core to do the same and have them communicate wireless, atleast that way i could move the switch around and the controllers to different rooms
Now with that i did look over the other post about screens to use with the core, but i would like to create an interface for the button so it looks nice, would i be able to do this with a colour I2C touchscreen?
Programming wise i have very simple knowledge so i will have to read into it more but so we think my proposed project is possible? So to outline what i want to do
Have a colour touchscreen, with an image drawn to mimic a button, maybe a slider to adjust brightness? Get the x and y positions and the core can do position checks for me. Its just finding a good I2C display that i can read x and y positions along side creating an image
Sorry if it didnt make much sense, i will try to re-explain if requested.
ref 1 - Example of the display, crude but simple