Skip to content

Commit

Permalink
pwm initialize fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanaculic committed Nov 5, 2024
1 parent b38d194 commit 71c2281
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = function (blockly) {
Blockly.Python['pwm_initialize'] = function(block) {
Blockly.Python.import_machine();
var value_pin = Blockly.Python.valueToCode(block, 'pin', Blockly.Python.ORDER_ATOMIC);
//var frequency = block.getFieldValue('frequency').toString();
var pin_name = block.getFieldValue('pin_name').toString();

var code = pin_name + ' = machine.PWM(machine.Pin(' + value_pin + '))\n';
return code;
Expand Down

0 comments on commit 71c2281

Please sign in to comment.