this is my demand for help, regarding to my second part of my project. In the previous part I tried to send a string to six solenoids. They should display it in Braille font. Since that worked well with some help, I am now trying to write in the serial monitor with morse through a capacitive touch sensor.
Currently I am using a code example from another mister. You can see it attached without my monster code included.
The problem is, that I am not able to combine my solenoid and the morse part... maybe I messed things up on the way.
Thank you in advance.
PS: I really wanted to use inline code but it's too long and I'm not able to break it down, since it worked on the minimal basis. You find it attached. I'm sorry
Hello terryking228, that's cool with your home! I apprechiate that
I did everything again like in the link but it's still not working...
Hey MorganS, not exactly - I just want to write it down in the serial monitor. After that the string gets parsed and written in Braille through the solenoids.
Hi Blackfin, the charactersToMagnets() "translates" the textinput to the solenoid commands. E.g. if you type in a "a", it'll move all solenoids except for one downwards.
NinaBraille:
Hi Blackfin, the charactersToMagnets() "translates" the textinput to the solenoid commands. E.g. if you type in a "a", it'll move all solenoids except for one downwards.
Thank you for your support everybody
This?
void charactersToMagnets()
{
digitalWrite(solenoidPin1, LOW);
digitalWrite(solenoidPin2, LOW);
digitalWrite(solenoidPin3, LOW);
digitalWrite(solenoidPin4, LOW);
digitalWrite(solenoidPin5, LOW);
digitalWrite(solenoidPin6, LOW);
while (Serial.available() == 0)
{ //Wait for user input
}//while
}//charactersToMagnets
does nothing but turn off the solenoids and then waits for a character. It seems superfluous.
I tried a few changes to see if the Morse stuff could work with your code. Some of that included condensing the solenoid drive stuff a bit and using millis timing for the solenoid delays. I also commented out the seemingly useless charactersToMagnets for now. Compiles but not tested.
Hey Blackfin, I am super impressed by your work! Thank you for spending so much time and effort in finding a solution for my problem. I tried it and now the touch sensor works, but my solenoids aren't moving.
The "charactersToMagnets()" was for leveling the solenoids when no text input is there. That's only because my solenoids heat up like crazy when their heads are down for a too long time... (solenoid: 12V, 120mA)
So you spell out "Alexa turn the lights on please?" in Morse?
Actually I've been using Morse for home control since 1976. Since it's silent when lying in bed in the dark, my wife won't think I'm talking to HER. She's used to the Oley accent on the kitchen speaker.
I KNOW the Times Are A'Changing. Fast. My 14th Grandchild says, "Alexa. Play "Rock Around The Clock". I'm trying to keep SOME of the Old Times alive.
Actually I started with the software Morse in 1975 when a friend and I at IBM wrote a DOS device driver that put characters into the input buffer from a Sip-Puff switch for a young smart paraplegic kid. He couldn't speak, though... so even though the IBM Speech Recognition board was running at Yorktown, it wouldn't have worked for him.
There was a commercial software system the kid could have used. It cost $1200 back then. That pissed us off.
terryking228:
Actually I've been using Morse for home control since 1976. Since it's silent when lying in bed in the dark, my wife won't think I'm talking to HER.
Intriguing! Do you have your system documented anywhere?
Hey blackfin, I added them, but there is no text in the Serial Monitor to see. I attached the code in case I added your codesnipped falseish elsewhere...
Unfortunately they do not move when I enter a text message via the Serial monitor. But the Morse Code works perfectly... Where or how do you see the tickled solenoids?
NinaBraille:
Unfortunately they do not move when I enter a text message via the Serial monitor. But the Morse Code works perfectly... Where or how do you see the tickled solenoids?
Looking at pins 2, 5, 6, 7, 8 and 10 with a scope while typing strings into the serial monitor and hitting enter.
For sanity, the version of code you have that doesn't work with the Morse drives the solenoids okay, changing nothing else?
I have a HugePileOfCode since this does all kinds of stuff like handling the solar pool heater, some lighting etc. And snippets for the grandchildren to listen to. If you want I can email you a ZIP. PM me your email...
This has vestiges of long-ago stuff, and maybe even from the 1997 translation from the original IBM PC Turbo PASCAL code
I promised someone else I'd try to separate the pool heat code. Didn't do it
Mhm I tried to check as good as I can why there is no solenoid movement... at this point: "if (newData == true)" it seems to be that the program does not go in this "if". Like if I type "Serial.print("hello")" or something, and then type a character in the Serial monitor, there is no "hello" to see...
If I run it on my 2560 and type stuff in the monitor it outputs the following:
for characters not recognized in the table, Pattern is 0x80 and there's no delay indicating solenoid activity. If I type in a string of lower-case letters, it prints them one at a time with a half-second delay between them which indicates it's running through that part of the code.
Unfortunately all I see from my "hello" is "oo" in the Serial monitor - that's so weird. Also because it works in your program... I use an Arduino UNO with the right board and port settings, but I can't see where I can manage the Baud rate (only in the Serial Monitor which is also 9600). I use exactly the same code as you do