The Picaxe to Keyboard (Keyboard wedge)

phoenix70

New Member
Hello Friends Picaxe, once but I need of their help in the forum, have I designed two modules with Picaxe 18X, and Soon with 28X or 40X, does the first one read a scale for the serial port, does read a ds1307, and a memory 24LC64, does each one of the heavy ones record, and this send them serial (does it date, hour, does weight, weigh -accumulated, weigh maximum, minimum), to other I do modulate with a screen LCD 16x2, with which I compare and do I verify and do I modify, and other things, until here all well, the detail is that in the company where I work it requires that certain fact is placed in the PC, for the port of the Keyboard, and read by a program (As a Gun of code of Bar), does the weight have to send it my card with Picaxe, please like I begin? I am not able to visualize the program neither the schematic design, here this them the code of the I modulate #2 of the screen LCD to see if they are located with me, I am from Venezuela, and theirs would thank them very much again for their valuable help, thank you.

The idea is that when a weight is received a serial plot it was sent by the keyboard where (as if one writes) a program will be waiting to capture this it is easy via serial for hyperterminal, but it is required that if I am in Excel or another program, for example where this the cursor is written the serial plot automatically. And here is where I not see the program or the design electronic.

I need to desing a Keyboard wedge con picaxe, please helpme


 
 

inglewoodpete

Senior Member
newphoenix, Tell me if I understand:

You are making some electronic scales using PICAXEs.

The output of the PICAXE is serial. The serial data is similar to a barcode reader.

The serial data is fed to a PC.

The data needs to be logged to a Microsoft Excel spreadsheet.

Can you confirm this?

-Peter
 

phoenix70

New Member
Yes Peter

I am working into scale with port RS232, the picaxe to conect this work with LCD 20x2

yes, the port serial is similar ar barre code, I believe the code into picaxe and the data is constant to pc

The data is necessary in where is the cursor , I to capture with visual basic and process, but not in other programs, excel, word, premium, cas, etc (where is the cursos there ara the data), please Do you have a got Idea ? electronica or programacion vb, vfox, c+
The data needs to be logged to a Microsoft Excel spreadsheet.

Can you confirm this?

-Peter
er

 
 

moxhamj

New Member
Yes you can do all these things. All the various parts have been posted on this forum before.

1) Measuring something with a picaxe eg a weight.
2) Displaying on an LCD - in the manual.
3) Creating a serial output - one command =Serout.
4) Reading that serial data using VB - yes - about 30 lines of code and we can help with that.
5) Saving that data into a .csv text file - easy to do with VB.
6) Open excel and read the .csv file.

How much coding experience do you have with VB and picaxe basic? And are you writing in English or using a machine translator?
 

phoenix70

New Member
No, Dr_Dracula I need this automatic I press a bottom in picaxe and the weight in scale go to cursor in the pc (word, excel (combo box)) where is the cursor, The LCD, add, average , printer is easy

 
 

moxhamj

New Member
It can be all automatic. We can make it so you push the button and it prints out on a piece of paper and stores the data and even puts it on a website if you want, all automatically. I have written code to do all these things, as have many others on this forum. But I don't want to build your whole project for you as I'm sure you can get a lot of it working on your own.

How much have you got working so far? Can you measure a weight and show a value on the debug picaxe screen?
 

hippy

Ex-Staff (retired)
newphoenix : <i>I need this automatic I press a bottom in picaxe and the weight in scale go to cursor in the pc (word, excel (combo box)) where is the cursor </i>

I interpret that as automatically putting the data sent by the PICAXE into the PC whenever a button is pushed, and that data is written to the PC Application running, at wherever the cursor is.

That is really a PC programming issue beyond the scope of this forum, but I am sure people will help if they can. I am not sure anyone will have done that themselves though.

This would require a 'driver' or 'helper program' writing which can take serial data and feed it to whichever application has focus. This may be possible as a Visual Basic program using SendKeys, or in a another language or using other techniques.

If Visual Basoc plus SendKeys works it should be fairly straight forward. What PC programming languages do you know, and what experience do you have in programming a PC ?
 

phoenix70

New Member
Yes Dr_acula, I press the button in picaxe, and I capture the weigh in the scale , I show in the LCD and is sending to printer MP2100TH Bematech with code of bar and this working fine. My question is This data serial in other pin out it contains date, hour, operator, weigh acumulated, and weigh total I need to place it into cursor as hippy says
My idea is to connect the picaxe to in keyboard PC, as gun laser of code bar (for not writting a program) only a board with picaxe , have they established this way a communication? I know to the you review the keyboard to the picaxe, but I don't know the protocol neither the voltage levels or the retards or pulses, Is possib

It can be all automatic. We can make it so you push the button and it prints out on a piece of paper and stores the data and even puts it on a website if you want, all automatically. I have written code to do all these things, as have many others on this forum. But I don't want to build your whole project for you as I'm sure you can get a lot of it working on your own.

How much have you got working so far? Can you measure a weight and show a value on the debug picaxe screen?


 
 

phoenix70

New Member
Yes hippy, As well as you say, but it is not possible to connect the picaxe to the entrance of the keyboard of the PC, without a program I know this instruction but I wanted only a board electronic with picaxe , Imagine a gun of bar code, but with the connected picaxe as out device, If it connected the picaxe to the keyboard, I believe that it would solve, they possess some diagram or which is the communication protocol, (he/she Has to be dual I cannot lose the keyboard it is the picaxe or the keyboard), such which the connection with the gun, thanks hippy

 
 

moxhamj

New Member
Yes you can interface to the keyboard <A href='http://www.beyondlogic.org/keyboard/keybrd.htm' Target=_Blank>External Web Link</a>

But it seems a very complicated way of doing things. I'd rather use a VB program with a text box and input the data via RS232 from the serial port into that text box.

How much of this have you already got working?
 

hippy

Ex-Staff (retired)
Getting a PICAXE to replace a keyboard would be difficult, and while keeping the existing keyboard even more so. I am afraid I have no experience of either.
 

inglewoodpete

Senior Member
I've been away for a day. I see there's been some progress.

A possible solution could be to have a VB program running in the background. Its job would be:
* monitor the serial port
* log incoming data to a file with a fixed name/location and when a termination character (Eg CR/LF) is received, close the log file.
* return to monitor the serial port.

A VBA script in Excel would:
* periodically (Eg every 0.5 seconds) check for the existance of the above data file.
* read and process the data from the file
* close and delete the file
* return to check for the file again

The excel spreadsheet could launch the VB application to make startup simpler. You would use VBA's Auto_Open macro name and Shell command.
 

phoenix70

New Member
Thank you for the help and the link, I will attempt it with the direct connection to the keyboard, although it is difficult, I will attempt it, but him ihare for visual basic, the inglewoodpete idea is been worth but not alone it is for that reason for Officce but any program it requires that in this project the weight appears where is the cursor without caring the program or if it has macros or not. I am from Venezuelan

 
 

phoenix70

New Member
Does I need to improve the answer speed from my program to the salidasde rele, can you see my code and to see if I am redounding in something? some mail to send it ? its 2 programs in 18X

 
 
Top