I2C Keyboard 8x8 device
Moderator: Benj
-
- Posts: 188
- Joined: Thu Jun 28, 2012 7:29 pm
- Location: Durham
- Has thanked: 86 times
- Been thanked: 186 times
- Contact:
I2C Keyboard 8x8 device
Hi everyone
I am working on a prototype device which, will scan a keyboard ( will be up to a full 80 plus keys) and send the key pressed to your project, using the I2C protocol. This device is independent to your project, therefore, it requires a FC7 component to communicate with it.
Everything is working well so far, but I need to be able to get the graphic the way I want it for the FC7 component. This is what it looks like so far:
Q. How do I get a suitable graphic of a keyboard to display correctly within FC7. When I put a jpeg file attachment to the component is only shows a white square.
I am hoping to get the device along with the tutorial guide on how to build it and the FC7 component, ready for early in the new year.
Regards
Dave
I am working on a prototype device which, will scan a keyboard ( will be up to a full 80 plus keys) and send the key pressed to your project, using the I2C protocol. This device is independent to your project, therefore, it requires a FC7 component to communicate with it.
Everything is working well so far, but I need to be able to get the graphic the way I want it for the FC7 component. This is what it looks like so far:
Q. How do I get a suitable graphic of a keyboard to display correctly within FC7. When I put a jpeg file attachment to the component is only shows a white square.
I am hoping to get the device along with the tutorial guide on how to build it and the FC7 component, ready for early in the new year.
Regards
Dave
Last edited by johnsondav on Thu Dec 14, 2017 9:01 pm, edited 1 time in total.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: I2C Keyboard 8x8 device
Hi Dave,
Sounds good
You could try adding the image as a resource, via the export component properties menu,
Then add a rectangle object and add the resource to the image property of the rectangle
Sounds good
You could try adding the image as a resource, via the export component properties menu,
Then add a rectangle object and add the resource to the image property of the rectangle
-
- Posts: 188
- Joined: Thu Jun 28, 2012 7:29 pm
- Location: Durham
- Has thanked: 86 times
- Been thanked: 186 times
- Contact:
Re: I2C Keyboard 8x8 device
Hi LeighM
Thanks you for suggestion. This is what is displayed within the component build:
This is what is displayed when the component is placed in a project: There is a small red exclamation mark next to the image file, not sure what it means.
Regards
Dave
Thanks you for suggestion. This is what is displayed within the component build:
This is what is displayed when the component is placed in a project: There is a small red exclamation mark next to the image file, not sure what it means.
Regards
Dave
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: I2C Keyboard 8x8 device
Hi Dave
Well it looks like you have identified a recently introduced bug in the component resource feature, which is inhibiting their selection as an image to a drawing primitive.
The exported component will need the resource feature to work for images to be visible to component users. So it’s something that we have raised here as needing fixing in the Flowcode executable.
As a temporary workaround, using the absolute path, rather than relative, to the image for the image property should enable the image to be seen in the exported component. But only on your PC that has access to the image. Hopefully that will allow you to continue working on the component.
Regards,
Leigh
Well it looks like you have identified a recently introduced bug in the component resource feature, which is inhibiting their selection as an image to a drawing primitive.
The exported component will need the resource feature to work for images to be visible to component users. So it’s something that we have raised here as needing fixing in the Flowcode executable.
As a temporary workaround, using the absolute path, rather than relative, to the image for the image property should enable the image to be seen in the exported component. But only on your PC that has access to the image. Hopefully that will allow you to continue working on the component.
Regards,
Leigh
-
- Posts: 188
- Joined: Thu Jun 28, 2012 7:29 pm
- Location: Durham
- Has thanked: 86 times
- Been thanked: 186 times
- Contact:
Re: I2C Keyboard 8x8 device
Hi Leigh
Very much appreciate your help. However, putting the full extension details in has not solved the problem.
No matter, it will not prevent me from continuing to developing this component until such time the issue can be resolved.
Regards
Dave
Very much appreciate your help. However, putting the full extension details in has not solved the problem.
No matter, it will not prevent me from continuing to developing this component until such time the issue can be resolved.
Regards
Dave
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: I2C Keyboard 8x8 device
Hi Dave,
I've found a workaround using the Component -> Initialise event.
You add the image to the resource manager as usual.
Then enable the Initialise event and assign a macro.
Inside the event macro use the File.AbsPath function to get a path to the file as a string.
You can then assign this to the "Image" property of the component.
This seems to work well but obviously is not as cool as being able to load the image directly.
Here is a demo you can follow. Let us know how you get on.
I've found a workaround using the Component -> Initialise event.
You add the image to the resource manager as usual.
Then enable the Initialise event and assign a macro.
Inside the event macro use the File.AbsPath function to get a path to the file as a string.
You can then assign this to the "Image" property of the component.
This seems to work well but obviously is not as cool as being able to load the image directly.
Here is a demo you can follow. Let us know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 188
- Joined: Thu Jun 28, 2012 7:29 pm
- Location: Durham
- Has thanked: 86 times
- Been thanked: 186 times
- Contact:
Re: I2C Keyboard 8x8 device
Hi Ben & Leigh
You guys are brilliant. Solved.
Hope you both and your families have a wonderful christmas.
★˛˚˛*˛°.˛*.˛°˛.*★˚˛*˛°.˛*.˛°˛.*★Merry*★* 。*˛.
˛°_██_*.。*./ ♥ \ .˛* .˛。.˛.*.★* Christmas*★ 。*
˛. (´• ̮•)*.。*/♫.♫\*˛.* ˛_Π_____.♥Everyone ♥ ˛* ˛*
.°( . • . ) ˛°./• '♫ ' •\.˛*./______/~\*. ˛*.。˛* ˛.*。
*(...'•'.. ) *˛╬╬╬╬╬˛°.|田田 |門|╬╬╬╬╬*˚ .˛ ...
Regards
Dave
You guys are brilliant. Solved.
Hope you both and your families have a wonderful christmas.
★˛˚˛*˛°.˛*.˛°˛.*★˚˛*˛°.˛*.˛°˛.*★Merry*★* 。*˛.
˛°_██_*.。*./ ♥ \ .˛* .˛。.˛.*.★* Christmas*★ 。*
˛. (´• ̮•)*.。*/♫.♫\*˛.* ˛_Π_____.♥Everyone ♥ ˛* ˛*
.°( . • . ) ˛°./• '♫ ' •\.˛*./______/~\*. ˛*.。˛* ˛.*。
*(...'•'.. ) *˛╬╬╬╬╬˛°.|田田 |門|╬╬╬╬╬*˚ .˛ ...
Regards
Dave
-
- Posts: 188
- Joined: Thu Jun 28, 2012 7:29 pm
- Location: Durham
- Has thanked: 86 times
- Been thanked: 186 times
- Contact:
Re: I2C Keyboard 8x8 device
Hi Everyone
The project to build this device is now available here:
viewtopic.php?f=66&t=19658
Here is the Keyboard/Pad component for you to place in your own component library: Here is project that makes the keyboard component: You will need this image file for the above project to create the component correctly: Right click and save the image to the same folder as the project.
Full construction details are provided for this project if you follow the above link.
Regards
Dave
The project to build this device is now available here:
viewtopic.php?f=66&t=19658
Here is the Keyboard/Pad component for you to place in your own component library: Here is project that makes the keyboard component: You will need this image file for the above project to create the component correctly: Right click and save the image to the same folder as the project.
Full construction details are provided for this project if you follow the above link.
Regards
Dave
-
- Posts: 188
- Joined: Thu Jun 28, 2012 7:29 pm
- Location: Durham
- Has thanked: 86 times
- Been thanked: 186 times
- Contact:
Re: I2C Keyboard 8x8 device
Hi Everyone
You may wish to experiment with using this component. Here is an example of how the keyboard component is used: All the information required to follow this project is available using the above link.
Regards
Dave
You may wish to experiment with using this component. Here is an example of how the keyboard component is used: All the information required to follow this project is available using the above link.
Regards
Dave