示例#1
0
        private void updateTexture()
        {
            telaSpikes.updateTexture(texSequence[textureSeqIndex]);
            telaSpikes.sendData();
            telaSpikes.spikeTransfer();
            telaSpikes.ESPSerial.WriteLine(Protocolos.wf_spike);

            Console.WriteLine("Updated");
        }
示例#2
0
        /*
         * Updates the uC with the desired texture.
         * When the parameter is 0, it uploads the texture corresponding to 'texSequence[textureSeqIndex]'
         * Else, it update the texture corresponding to the parameter (needs to be from 1-3)
         */
        private void updateTexture(int num)
        {
            // When 0, it follows the sequence defined in texSequence
            if (num == 0)
            {
                telaSpikes.updateTexture(texSequence[textureSeqIndex]);
            }
            // Else, it selects the texture corresponding the number 'num'
            else
            {
                telaSpikes.updateTexture(num);
            }

            telaSpikes.sendData();                               // Send stimulation data to uC
            telaSpikes.spikeTransfer();                          // Send the spikes
            telaSpikes.ESPSerial.WriteLine(Protocolos.wf_spike); // Set SPIKE as the actie waveform

            Console.WriteLine("Updated");
        }