I have encountered problem with my Arduino Uno, I just recently started using arduino, and this is my first time to use the EEPROM. My problem is that I have created a password protected door, and due to several attempts I have stored so much password and I dont know which one is the correct, since it always prompts me "Wrong password". I have tried to:
display the password in the lcd using lcd.print
this made the lcd display characters with 111 and a character that looks like a 3 horizontal lines, I dont know how to input the 3 horizontal character lines on my keypad matrix
tried to clear the EEPROM memory using the built-in arduino example (EEPROM_clear)
but to no avail, the password in the EEPROM is retained , and now I cant figure out the password
What should I do please help me :(
Related
I'm trying to read data from the Yost Labs 3-Space Sensor Nano into LabVIEW via an NI MyRIO (1900). I was able to set up a sequence that communicates with the sensor through SPI. However, every time I run the program, it just spits out a single value of 255.
I think understand that I need to include something that allows all the bytes to be read. I just don't know how to go about it.
As an example, I'm trying to read the gyros (0x26) which have a return length of 12 and is a vector (float x3).
Here is my labview code
and here is the manual for the sensor. The commands I'm using are on pages 29-33. In the image, 0x2B is 'read temperature'.
Any help would be greatly appreciated! Thanks :)
Edit: i had messed up the wiring so now the output jumps between ~35 to 255. I'm still having trouble getting all 3 gyro values from the SPI read.
Quoting from Joe Friedrichsen in his comment:
The express block that resets the sensor is not guaranteed to precede the loop because there is no data flow between them. The LabVIEW runtime can see two independent and parallel groups and may choose to execute them simultaneously (which on the wire might mean reset comes between loop commands) or in "reverse" order. Add a wire from reset block to create a terminal on the loop.
Here's a picture of the fix.
You may wish to consider stringing the error wire through your program and wiring it to the stop terminal of the While Loop. Currently, your loop will keep running even if there's a fault in your hardware. Using the error wire would eliminate the need for the flat sequence structure.
I'm trying to read a Xilinx Spartan 3AN FPGA's 57-bit device DNA using Impact's batch command shell (ISE v14.6) and using the following command line call:
impact -batch file.txt
The contents of file.txt are:
setMode -bscan
setCable -p auto
addDevice -p 1 -file program.bit
readDna -p 1
quit
The response I'm getting from Impact is wrong and changes with each call I make. I know it's wrong because I've instantiated the DNA_PORT primitive in my HDL and am reading out the correct DNA. Here's the last few lines of one of the response from Impact:
Boundary-scan chain validated successfully.
DNA = '111111111111111100000000000000000000000000000000000000000'
Elapsed time = 0 sec.
Has anyone had any success with this command? If so, what am I doing wrong?
With help from Jonathan, I got to the bottom of this.
For the Spartan 3AN FPGA, you can only use iMPACT's batch commands to read the DNA from a blank part that hasn't had any other operations performed on it. Originally I was reading the DNA immediately after erasing the part and performing a successful blank check. These two steps were preventing iMPACT from being able to read the DNA properly on the Spartan 3AN even though it was blank. A power cycle of the FPGA after the blank check results in a valid DNA read.
I imagine this has to do with the behavior of the DONE pin. On this device, the blank check command causes the DONE pin to be asserted and also causes the FPGA to go into an inactive state whether it is blank or not.
Thanks again Jonathan for getting me on the right path.
I manage my accounts for websites with KeePass. This tool generates highly complex passwords, such as d,ªL¹(ç,z/¬gSÑ~}ÄwÚÆ¡íµ¯ó]ó6õ?Ô£fß,.
Such a complex password I use for example for Red Hat’s OpenShift website.
OpenShift servers/applications can be managed best by using their rhc command line tool.
Now, while running rhc setup I have to enter my password. So I copy it into the clipboard and paste it into the shell, where rhc sits and waits for my PW. However, the password won’t get accepted.
The process of pasting probably causes some changes. I already tried doing chcp 1252 and chcp 65001 before running rhc setup. Unfortunately this also didn’t help. The only way to get it running was changing my password to a trivial one on the OpenShift website, then doing the setup, and then changing the password back to a complex one.
Anyways, now I want to log in to my applications via rhc ssh, which is asking for the password of my ssh keys. And as everyone can guess, my ssh key is protected by a password in the style above. This is no problem because pasting such passwords into Putty or other GUI applications works great.
So I wonder: is there a way how I can do safe pasting into windows shells?
I commend you on your passwords!
There's two major possibilities:
Some characters need to be escaped
Shift to a longer password without the escape-requiring characters
Escape the characters!
Code page fun, i.e. some characters are being transformed
Figure out the mapping and duplicate your KeePass entry with one that will map to the correct values for that login type
Shift to a longer password without the escape-requiring characters
Assuming your password (unlikely) is a 35 character password using all 256 possible 8 bit values, that's a maximum exhaustive keyspace of 256^35, roughly 2E84 or 2^280. You can achieve a slightly higher maximum exhaustive keyspace with a password of 43 charactres containing Upper, Lower, Number, and normal US keyboard symbols (94^43), or 48 characters containing Upper, Lower, and Number (62^48).
The Upper, Lower, Number password of length 48 shouldn't cause any problems with escaped characters, and is far less likely to cause problems with code page transforms.
Note that both of those are likely to be superior against the edge case of an attacker who knows which characters were actually used :).
Note also that even a 35 character password containing only Upper, Lower, and Number has a maximum exhaustive keyspace of 62^35, or 5.4E62, or 2^208; 208 bits is likely to substantially exceed the amount of security provided by your transport layer and/or their storage mechanism.
*All passwords in this math are assumed to be 100% cryptographically random!
I know that this is an old topic for vfp programmers. Still, I want to ask for advices that can improve the printing time for my particular case.
I recently asked to change a report written in vfp. It use commands such as fputs, etc. The user prints this report in a dot matrix printer and of course : no problem. But the user asked for column addition and some complex calculation in the report. We tried to avoid paper size changes. So my initial solution was to rework the report using report designer, and set the page orientation to landscape. The result is so slow when printed.When I open the print queue, it even shows error - printing status!
I've tried to instal the printer driver in my local PC ( the machine where I compiled the exe) and selected this printer, both with 'save printer environment' checked and unchecked. Still the same result.
Any suggestions? Other tricks for my case are welcomed. Thanks in advance.
Sometimes, and not sure if its your case, when creating a report in VFP, it saves the printer environment based on the computer used to develop it (ie: your machine). To check, and since all reports are nothing but .DBF tables renamed, try the following. Open the report as a table
USE YourReport.frx (you have to explicitly include the .frx extension)
BROWSE
The first line in the report is your environment information that includes paper size info, orientation and even printer information. Double click in the column "Expr". The only things you probably need in this column are
ORIENTATION=1 (or 0)
it may have other stuff and look something like
DRIVER=winspool
DEVICE=\some\printershare
OUTPUT=IP_192.168.1.22
ORIENTATION=1
PAPERSIZE=1
SCALE=100
ASCII=0
COPIES=1
DEFAULTSOURCE=15
PRINTQUALITY=600
COLOR=2
DUPLEX=2
YRESOLUTION=600
TTOPTION=3
COLLATE=0
You can remove the rest of it. Next, close this column and tab over about 10 more columns to "Tag" and "Tag2". They are also MEMO type fields. Open them up. Remove ALL data out of these two columns... BUT ONLY FOR THE FIRST ROW!!!! If you open them, you would see more embedded stuff about the printer, just remove it completely. Do NOT do a global replace to blank for all rows as that will kill the report content... ONLY the first row.
All this being said, I can't guarantee, but it may be the culprit... but then again, doing direct output on old dot-matrix printers might actually be faster than all the fancy rendering the printer drivers are doing.
Trying to print a report from the report designer through the windows driver to a dotmatrix printer will never be acceptably quick.
That's why they originally did the report using commands.
Your choices are either change the printer to a laser printer (probably not possible I'm guessing) or change the report back to the old style.
It's hardly difficult to print fast on a dot matrix printer with VFP reports, you should do it on a raw mode, but not on ?? or ??? way, I mean on API calls like this:
--- RawPrint VCX ---
http://www.universalthread.com/ViewPageNewDownload.aspx?ID=9556
You can use a wrapper, with kind-of "Formats" support it's a commercial software but it's worthy if you need to do a lot of reports with this kind of printer:
--- DosPrint 4 ---
http://www.victorespina.com.ve/hs/es/index.php/DOSPrint4_%28VFP%29
(disclaimer: the developer of DosPrint 4 it's a friend of mine, and I worked with him testing and supporting on the previous version DosPrint 3 on the spanish MS-VFP newsgroups and http://Portalfox.com)
Try using the Microsoft Generic Text only print driver
I am working on reading the barcode using a scanner and I have the following questions:
Is there a way to distinguish between the input from the keyboard and input from the scanner ? This is required for me because the barcode reader will include a preamble, terminator and a prefix to the barcode value. For ex, if the value is 12345 the barcode will have \pre12345\ where \ and \ indicate the start and end and pre identifies the type of data.
If I know that the data is being typed from keyboard and not from a scanner then I would show whatever the user types.
If I know that the data is from a scanner then I will strip of the \pre and \ and show only the data.
Thanks,
My answer assumes that you are using a barcode scanner in "keyboard wedge" mode where it simply emulates a keyboard and does not have some special connection. These devices are often USB and work this way out of the box without any further configuration.
Would the user ever have occasion to actually type your \pre text? Often the prefix is chosen specifically to be a set of characters that the user will never enter or will at least very rarely want to enter. Thus, the mere presence of the prefix indicates a scanned barcode.
Another option would be to time the input. For example, the input from the barcode scanner will probably all be complete within a very short time (e.g. 50ms). If a user were typing the value via the keyboard, it would be impossible for him/her to type the prefix, the data and the postfix all within 50ms. (Of course, assumption here is that input will be made by an actual human and not by automated tools)
well yes! input from the barcode scanner should have first initialized itself through a COM port or serial connection. I know that many apps restrict input to certain field through specific ports, but beyond that I'm not sure.
One solution that I came up with was to start all of our barcodes with a unique sequence of characters not known to the user. I check for this sequence on the input to tell me how the data was entered.