I found the page where teensy 3.5 is not fully compliant with keyboard, but since I had one already I thought I'd give it a shot.
Bare Bones, my code seemed feasible. Yes/No?
Now my results are somewhat.. questionable. In the two seconds before I hit the HalfKey, notepad obtained this data:
So Half this data is gibberish, and the other half prints regardless of button being HIGH, LOW, whatever. Analog adjustments also make no difference, it's all just nonsense output
Removal of the ProcessKeys() method yields the same result. Gibberish from empty code.
Can somebody run my code through a Teensy2 or something before I go out n buy one por favor?
I'm using a wiring from the RaspberryPi where I had a digital only sample working for an example where the view updated text properly, but peripherals with analog are the way to go with my projects. Included is a clip of the tip. Button to ground, button to Pin0. Analog to ground, Analog to 3v, middle pin to Pin32.
Aside from having a messy breadboard, it should all be theoretically sound, as my first analog project. Any idea if the crappy potentiometer what done come with my Pi should work properly for this?
Bare Bones, my code seemed feasible. Yes/No?
Code:
//#include <Keyboard.h>;
const int analogPin = 32;
void setup(){
pinMode(0, INPUT_PULLUP);
digitalWrite(0, HIGH);
}
void loop(){ProcessKeys();}
void ProcessKeys()
{
int analogValue = analogRead(analogPin);
if (digitalRead(0) == LOW){
if (analogValue <= 50){
Keyboard.write('=');
}
}
}
Now my results are somewhat.. questionable. In the two seconds before I hit the HalfKey, notepad obtained this data:
==t=?=w=Y===:=a=*=U=B=X=Z=]=W=2=*=)=v=`=f===
=2====R=J=Q=\=/=<=K=6==!=D=+=4===-===?==P=w=V=y={=%=9=F=?=>==W= =9=A=<====B=;=;=====@==Z=;=8=8=G===-=<=t=W=A==6==$=2=
=&="=:=="=%=== =h=H=V=X=E==#=U=V=]====u=<=/=3=:=%=1=:=9=/=6=%==(=>=A=8=<= =-=1=7=9=*= =B=k=H=;==(=)=~=z=N=N=B=/== =Z=B=V=%=X=\=[=="=M=:=C=>=O=C=(=!=
=T=u=U==A=d=C===>=G=D=D==B==3===A=<===[=
==Z=k===9=I=M=;=U==B=S=_=)=@=$= =l=u=:=-=)=c=q=Y=(=s=;=?==4=-===?=*=8=A==G=:=%=6=<=+===.=
==<==A=T=>=E==4=#=s=e==1===B=U=W=[=E==2=B=Y=q=|=Z=+=U=C=(=?=O=w=#=9==)=.=6=9=D=Z=@=I=c=;=W==E=G=="=:=D=C=w=<=====s=K====*=q=(=Q==1=?=>=A=?=-=8==B==#=V=X=`=D=?=1=<=
=@=l=p=A='=F=9==/=-=Y=w=V=U==;=K=8=B=E=@==(===;="=#=(=0=3=3=K=<=;=?=F=D=x=v=T=;==+=Y=I=Y=6=k=@=b=B=Y===U=w===:=F=0=H=C=z=V=="=2=>=R=!=,=D==;=P=`=N=S=:=`=;=@=V=.=D=J=3=R=%=<==0=D=$=l==@=7=?=U=b==7=.=H=V====)=i=(=,=U=h=L=Y==
=`=Y=P=,===;=R=A=a=)=
=Y=2=%=6=8=T=a=?===:=_= =2=N=g=B=B=A= =)==E=b=|='=:=Y=C=z=Z=C=S=t==2=`=T=d===A=@=8=<=k= =0=C==<=-= = =U=(=g=U=A=====>=*==B==
=D=;="=:=W=:=`=\=?=A=4=<==@=+=z=J==6=====1= =9=;=D===
= =:===9==9=7=8=G===A=p=a=9=8=4=U=w==
=S=z=(==@=2=%=
===n=h=B=>=<=-==`=r=_=*==9=="=-=(=u==== =b=A=F= =E======|=B=@=-=A=C=c=F=a=
=Q=8=;=T=A=%=T=`=D=.=;=<=8=T=9= = =A===a=G=W=
So Half this data is gibberish, and the other half prints regardless of button being HIGH, LOW, whatever. Analog adjustments also make no difference, it's all just nonsense output
Removal of the ProcessKeys() method yields the same result. Gibberish from empty code.
Can somebody run my code through a Teensy2 or something before I go out n buy one por favor?
I'm using a wiring from the RaspberryPi where I had a digital only sample working for an example where the view updated text properly, but peripherals with analog are the way to go with my projects. Included is a clip of the tip. Button to ground, button to Pin0. Analog to ground, Analog to 3v, middle pin to Pin32.
Aside from having a messy breadboard, it should all be theoretically sound, as my first analog project. Any idea if the crappy potentiometer what done come with my Pi should work properly for this?