Posted: Sun Mar 26, 2017 9:18 am Post subject: Arduino Leonardo as a password storage device in a PS/2-line
Hello,
I am new to Bascom-AVR.
My project is to add the Arduino Leonardo in a PS/2-line to use it as a password storage device.
Is there any Bascom-AVR code already published ?
ICould it be possible to drive it using a 4x4 keypad ?
Posted: Sun Mar 26, 2017 6:41 pm Post subject: Password storage device
Hi JP
Thanks for the reply.
When I started the project I have made a program using the Arduino IDE as I found in the web that a serial output i.e via USB is only possible with the Arduino Leomardo (Atmega32u4).
But the Leonardo can only send one letter in the used program as I noticed. Therefore I bought the Bascom-compiler to solve the problem.
Is it possible to use the buffer to read out serially a string containing 8 password letters ? Afterwards it has to be send serially via RS232 which can be converted by hardware.
Regards
Theo
I use Arduino Uno and arduino M2560, so I don't know very well leonardo, but I see in the Arduino site :
Quote:
The Leonardo has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega32U4 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX).
and I know Basic Bascom is a complete program with a lot of possibilities for serial communications. and with a long help file you must spend time to learn !
see the help for "using uart" you can follow the sample about buffer data
the Ischarwaiting() instruction is very powerfull to fill an array of chr.
I use it like that :
another µP send a sentence stating by Chr(254) and stop with Chr(255)
---------------------------
Do
Sentence = "" : Kbyte = 1 : Serialflag = 0
Open "com3:" For Binary As #1
Do
If Ischarwaiting(#1) = 1 Then
Jbyte = Waitkey(#1)
If Jbyte = 254 Then
Serialflag = 1
End If
If Serialflag = 1 Then
If Jbyte = 255 Then
Clear Serialin3 ' note the Clear statement !!!
Close #1
Exit Do
End If
Tabdate(kbyte) = Jbyte 'i fill a array
Kbyte = Kbyte + 1
End If
End If
Loop
L1byte = L1byte + 1
---
---
loop
----------------
then you can fill a sentence with text = mid (........, J, 1)
Take care, in serial communication, we work in Ascii code .
take care about chr(13) chr(10)
use the ";" after print : print "bonjour"; ' print without chr(13 and chr(10)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum