Skip to content

Form-Employers
Form Employers

In previous article Array management by value we talked about one way to grant to us access to array's items: we used a by value approach, in the sense we surely took copy of items values by dereferencing a pointer to record we defined at the top of code.
Our intention was to emphasize that a copy by value can even be made with the help of a pointer.
Pointers in that context could represent an alternative way to archive or reach the documents: instead of alphabetically (array[index]), by coordinates (for example, just like in battleship).

 

Result is essentially the same:

  • we compile an original document and copy it to our file in archive;
  • we fetch documents, then copy info through pointers, manipulate them.

In other words, we prepare a new record with all data, then we store these values into an array of records; so we pass values.
On the other side we create locally a new record, where to host all fetched data from array, with pointer's dereference. ...continue reading "Array management by pointer"

Form-Employers
Form Employees - by value

Suppose you have to archive some documents in a public bureau, one for every person you serve.
You fill all data, assign an identifier, and collect papers together; all is ready to be filed.
Every time you need to see these documents, the identifier shall make you find them quickly.

We know archive can be a computer file: indeed the paper scheme is well represented by bureaucratic organizer softwares, among which the most important are database managers.

Independently by the way you adopt, this matter always belongs to data's and memory's representation and management.

Talking about programming we have now a basic but enough knowledge to realize a simple manager.
What we're going to realize is a collection of records, describing hypothetical employees with just three features: name, surname and ID number.
Only records to be archived: so array is perfect.
Let's see how to deal with it and its items: in this article data will be passed by value. ...continue reading "Array management by value"

Memory Representation Pointer
Memory Representation with Pointer

You're in troubles visiting an unknown city, having just discovered how unclear your map is.
Ask somebody the direction from where you're now, the Y position, to your X destination.
That's what you basically need.
More paths exist between Y and X, which can be fast but ugly, or long but panoramic: generally the way you reach X is not so important... and this is of worth for us too in our talk.
Indeed you only want to sign X and Y on your map.

Are you recognizing the web links surface behavior?
By starting from a web site you go to another one with a click, completely ignoring the path.
Classical example: from search engine results to a possible point of interest.

Yes, the point: you point your attention to it; the amount of solutions to get it is classifiable as pointer. ...continue reading "Pointers. Parents of web links"

Memory-representation
Memory representation with record

We commonly think to a record like something to be registered or annotated; musical, medical and data recording, and so on.
But structurally... what is a record?

Definition is so simple to result boring: a record is a structure (collection) of different nature data.

In the previous article we saw an important structure called array: a collection of homogeneous data.
An array can host only one kind of data per time: integer numbers or characters or arrays again...

Records offer one more degree of liberty: they can contain integers and chars and arrays... and records as well!

So a sport record is a possible collection of: first and last name (chars or strings), kind of sport (chars or strings) and the performance (typically a number).

Performance is what we commonly intend with sport record, but this is an example of metonymy (yes, we are poets too :)). ...continue reading "By coding a Record"

Liquid Filler 3D

We have already seen till now how we have constructed our project in PCB .
Liquid filler at this point needs calibration.
In this article we will discuss the calibration method.
The first step is to dimension correctly the RG resistor.
From the weight sensors article we already know that :
a) For a 1Kg load cell we are going to need Gain=1,07421875/0,005473=196 for a 1.1V arduino reference analogReference(INTERNAL); So we need a Rg=312 Ohm.

b) For a 20Kg load cell we need a Gain =  3925 for a 1.1V arduino reference analogReference(INTERNAL);
So we need a Rg=15 Ohm.

...continue reading "Liquid Filling Machine – Liquid Filler Part 4"