Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Arduino Leonardo as a password storage device in a PS/2-line

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO
View previous topic :: View next topic  
Author Message
MZ+78-TtY3

Bascom Member



Joined: 10 Mar 2017
Posts: 2

germany.gif
PostPosted: Sun Mar 26, 2017 9:18 am    Post subject: Arduino Leonardo as a password storage device in a PS/2-line Reply with quote

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 ?

Thanks in advance
Regards
Theo
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 827
Location: France

france.gif
PostPosted: Sun Mar 26, 2017 6:00 pm    Post subject: Reply with quote

Hi Theo,
Welcome here !
look at the help from Bascom about PS/2 : CONFIG ATEMU

unfortunately : The PS2 Keyboard and mouse emulator needs an additional commercial addon library.

https://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=35&category_id=6&option=com_phpshop&Itemid=1

Bon courage
JP Wink
Back to top
View user's profile Visit poster's website
MZ+78-TtY3

Bascom Member



Joined: 10 Mar 2017
Posts: 2

germany.gif
PostPosted: Sun Mar 26, 2017 6:41 pm    Post subject: Password storage device Reply with quote

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
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 827
Location: France

france.gif
PostPosted: Mon Mar 27, 2017 10:36 am    Post subject: Reply with quote

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 Wink you must spend time to learn ! Confused
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)


JP
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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